Avoid facts gathered twice when deploying with --limit
When deploying with argument --limit, both first and second plays in site.yml will be processed, causing host facts gathered twice, which is unnecessary. Thus a condition is added to the first play to avoid such redundancy. Change-Id: I20b84c59bf73aaeca929fc56465ff2cf1cf52b8e Closes-Bug: #1691033
This commit is contained in:
parent
dc5e05d8a2
commit
d366dd7e4a
@ -10,7 +10,8 @@
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- setup:
|
||||
tags: always
|
||||
when:
|
||||
- (play_hosts | length) == (groups['all'] | length)
|
||||
|
||||
# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The
|
||||
# limit arg will cause the first play to gather facts only about that node,
|
||||
|
Loading…
Reference in New Issue
Block a user