User Tools

Site Tools


start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
start [2017/01/24 17:47]
lubos
start [2017/01/24 17:56]
lubos
Line 1: Line 1:
-==== Excluding a host from Ansible from Command Line ==== 
  
-If you are like me, then your world is not ideal, which forces you to operate on multiple inventories. These multiple inventories have a caveat that some hosts like monitoring, log forwarding, jump stations, etc. are common boxes at the edge of these environments. Boxes like these should be excluded from from applying the configuration multiple times, once for each environment. 
- 
-There is an undocumented feature in ''​ansible-playbook'',​ which allows you to exclude the host. I have never found this anywhere in docs nor any of the books I hve, so here it is: 
- 
- 
-''​ansible-playbooks -i <​inventory>​ playbook.yml --limit='​!hostname'​ 
-''​ 
 ====== Ľuboš Medovarský - Blog ====== ====== Ľuboš Medovarský - Blog ======
  
start.txt · Last modified: 2017/01/25 13:57 by lubos