On 05.12.2016 11:19, Michael Byrne wrote:
Hi,

I'm new to Ansible so apologies for the the basic question.

I would recommend you read this page, it give answers to many basic question like this
https://docs.ansible.com/ansible/playbooks_intro.html


 I have a role called "*manage_prod_logs*"
It looks as follows:
________________________________________________________________________________________________________________________________________
---
- name: *Copy_File*
copy: src=skins/larry/bt/brandtone/task-automation/scripts/log_file_archiver.bash
dest=/bt/scripts/log_file_archiver.bash owner=ansible force=yes
group=brandtone mode=4755

- name: *Run_Script*
  command: "/bin/bash /bt/scripts/log_file_archiver.bash"
  become: true
  args:
   chdir: /bt/scripts
_________________________________________________________________________________________________________________________________________

The playbook is actually working properly at the moment for the remote host. My question is, will the task "*Copy_File*" above always execute before the
task "*Run_Script*" by virtue of their positioning within the task list
or do I need to do something else to ensure they always execute in sequence.

Yes, Ansible always run tasks in the listed order, starting from top to bottom in the file.

--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/99745821957ddc3d59f13d71bc4f6ff0%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to