--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/77cb5f2c-1277-4042-b43f-14bb40f3c10a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can call facts variable in playbook ,1- playbook to create a instace2- register instance instance creation facts and call IP to normal tasks adding variable in same play then call terminate playbook below.I have given you logic, more thought process you need to apply while you create a playbook taks.
On Fri, 24 May 2019, 23:02 Tuyen Nguyen, <daica...@gmail.com> wrote:
Hi--Currently, to do what I want to do above, I have 3 different playbooks running with a shell script.First the script runs a playbook aws.yml to start up an instance with a static IP address using the ec2 module, and I have it record the instance id to a local fileNext, the script runs a normal playbook task to connect to the AWS instance using the static IP address.Lastly, after the tasks are complete on that AWS instance, the script calls a last playbook to terminate AWS instance, and I pass the instance id as a variable using --extra-varsHow can I create a single playbook that would run the normal playbook task against the AWS instance?
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 ansible...@googlegroups.com.
You can call facts variable in playbook ,1- playbook to create a instace2- register instance instance creation facts and call IP to normal tasks adding variable in same play then call terminate playbook below.I have given you logic, more thought process you need to apply while you create a playbook taks.
On Fri, 24 May 2019, 23:02 Tuyen Nguyen, <daica...@gmail.com> wrote:
Hi--Currently, to do what I want to do above, I have 3 different playbooks running with a shell script.First the script runs a playbook aws.yml to start up an instance with a static IP address using the ec2 module, and I have it record the instance id to a local fileNext, the script runs a normal playbook task to connect to the AWS instance using the static IP address.Lastly, after the tasks are complete on that AWS instance, the script calls a last playbook to terminate AWS instance, and I pass the instance id as a variable using --extra-varsHow can I create a single playbook that would run the normal playbook task against the AWS instance?
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 ansible...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dce09a32-f7fb-42fa-8b63-ecfb0ce756af%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CADG%3DkoszgN2BYKqe6eL3MA%2Bsw%3DeGnx9Mf4fmpRgqtnXi4P%3DxOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Or look into AWS Batch. It's also fantastic for parallelisable tasks or many identical tasks. Lambda for tiny short-lived tasks, Batch for larger or long-lived tasks. Takes a bit of setup, but well worth it.Regards, K.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dce09a32-f7fb-42fa-8b63-ecfb0ce756af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 ansible...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CADG%3DkoszgN2BYKqe6eL3MA%2Bsw%3DeGnx9Mf4fmpRgqtnXi4P%3DxOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.