--
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/234cae5a-45de-41b1-92fa-d0bfbcf2ff7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 04/10/2014 09:38 AM, Fred Badel wrote:
Hello,
I am trying to set ansible-pull to provision ec2 instances ... with not much success so far ...
I tried using the ec2.py dynamic inventory:
ansible-pull -C feature/ci -d /home/ec2-user/ansible -i ansible/ec2.py tag_Name_qatest23 -U ssh://git@repo/infra/ansible-play.git local.yml
and I get the following error:ansible-pull "ERROR: provided hosts list is empty"
When trying a static inventory file with :
[coyote]127.0.0.1 ansible_connection=local
[eu-west-1:children]coyote
Correct me if I am wrong, but it seems like you are trying manage other ec2 hosts with ansible-pull?
ansible-pull is designed to only run plays against the current host and in fact limits the inventory to localhost/127.0.0.1.
If your intent is to execute playbooks when a git repo changes or from a git repo, you will need to combine git and ansible-playbook into a custom script.
#!/usr/bin/psuedo-code
cd $checkout
git pull --rebase
ansible-playbook -i inventory site.yml
You could also create a simple wrapper play ..
- hosts: localhost
gather_facts: False
tasks:
- git:
register: git_check <opts>
- shell: ansible-playbook <opts>
when: git_check.changed
--
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/fa352747-5280-4367-81dc-379a4b818ef6%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a9da2c5a-cbde-42d8-81d2-d4025de8396f%40googlegroups.com.