mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07: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:
parent
7e92ff823e
commit
ed8e60d804
9 changed files with 126 additions and 101 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue