Ansible v1.9.4
I have a playbook that I launch with:
$ ansible-playbook build.yml
build.yml includes set_os.yml (just a set of tasks) that launches some ec2
instances. build.yml looks like this.
- name: Build stuff
hosts: localhost
remote_user: ec2-user
sudo: False
gather_facts: False
tasks:
- include: set_os.yml
- include: build_soft.yml
At the end of build.yml above, I also include build_soft.yml which is
another playbook:
---
- name: Configure the EC2 instance
hosts: ec2hosts
gather_facts: true
tasks:
- do something......
Although I've seen examples of multiple plays, Ansible doesn't seem to like
this way of including
plays and immediately exists with:
ERROR: gather_facts [or hosts or tasks] is not a legal parameter in an
Ansible task or handler
I need to immediately start configuring my new EC2 instances that have been
stored in the "ec2hosts" group var.
Is this way of nesting plays not supported or am I making a mistake
somewhere else?
-J
--
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/eb1ca398-2fa6-46dd-bf59-e52efd7f28f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.