mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 14:01:42 -07:00
Flush cache (#17445)
* transfer module based on pipelining, not tmp fixes #17381 * added missing flush cache option back
This commit is contained in:
parent
68a4d40210
commit
a4abf8da79
2 changed files with 11 additions and 1 deletions
|
@ -148,6 +148,11 @@ class PlaybookCLI(CLI):
|
|||
# Invalid limit
|
||||
raise AnsibleError("Specified --limit does not match any hosts")
|
||||
|
||||
# flush fact cache if requested
|
||||
if self.options.flush_cache:
|
||||
for host in inventory.list_hosts():
|
||||
variable_manager.clear_facts(host)
|
||||
|
||||
# create the playbook executor, which manages running the plays via a task queue manager
|
||||
pbex = PlaybookExecutor(playbooks=self.args, inventory=inventory, variable_manager=variable_manager, loader=loader, options=self.options, passwords=passwords)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue