I use to additional groups, 'left' and 'right', to split my 'testing',
'staging', and 'production' groups in half. So I can use, say,
--limit 'testing:&left'
to run a playbook against the left half of my testing servers, or
--limit 'production:&right'
to run a playbook against the right half of my production servers.
Or I can have a playbook that runs two plays
---
- name: update left hand side of production
hosts: production:&left
tasks:
- include: tasks/update.yml
- name: update right half of production
hosts: production:&right
tasks:
- include: tasks/update.yml
Because I get to assign hosts to left and right halves in my
inventory, they can be different sizes for testing, production etc.
K
Kahlil (Kal) Hodgson GPG: C9A02289
Head of Technology (m) +61 (0) 4 2573 0382
DealMax Pty Ltd (w) +61 (0) 3 9008 5281
Suite 1415
401 Docklands Drive
Docklands VIC 3008 Australia
"All parts should go together without forcing. You must remember that
the parts you are reassembling were disassembled by you. Therefore,
if you can't get them together again, there must be a reason. By all
means, do not use a hammer." -- IBM maintenance manual, 1925
On 12 December 2013 08:45, Brian Coca <[email protected]> wrote:
> I have it both ways, I use an inventory dir with
> inventory/{dev,qa,staging,production} files, using -i, I can choose all envs
> or just one. Also you can run with run with --limit 'staging' and --limit
> 'produciton'.
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
--
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].
For more options, visit https://groups.google.com/groups/opt_out.