There might be a better way to do this, but I'm unaware of it, so I'm asking the list. I have a playbook that has two parts to it: 1. Pulls branch from git repo to the localhost (ie the Ansible server) 1a. compiles the code (it's a PHAR file, so nothing too onerous) 2. Pushes the code to our external servers.
Part 1/1a has a hosts: entry of 'localhost' and part 2 has a hosts: entry for our external servers that are getting the updated code. My question is, is there a way to abstract the second hosts: line so I can specify specific hosts/groups? IOW, if I set that hosts: line to 'production', is there a way to specify on the command line -i dbservers or other subset instead of manually editing that line every time? Second question, if the above question is just wrong/bad/not sane, is there a better way to do this? -- 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/06e2e541-bee0-471f-a7bf-cd5cb94bcfad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
