mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Cleanups and fixes to cli
* Mark methods which are really functions as staticmethod * Fix calls to other staticmethods to use the subclass rather than the base class so that any inheritance overriding will be honored. * Remove unnecessary logic and dead code * Fix a typo in a docstring of how to implement subclass init_parser() methods * Call superclass's post_process_args in ansible-doc * Fix copyright comment according to suggested practice
This commit is contained in:
@@ -179,7 +179,8 @@ class PlaybookCLI(CLI):
|
||||
else:
|
||||
return results
|
||||
|
||||
def _flush_cache(self, inventory, variable_manager):
|
||||
@staticmethod
|
||||
def _flush_cache(inventory, variable_manager):
|
||||
for host in inventory.list_hosts():
|
||||
hostname = host.get_name()
|
||||
variable_manager.clear_facts(hostname)
|
||||
|
||||
Reference in New Issue
Block a user