1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-29 06:58:55 +00:00

Reformat everything.

This commit is contained in:
Felix Fontein 2025-11-01 12:08:41 +01:00
parent 3f2213791a
commit 340ff8586d
1008 changed files with 61301 additions and 58309 deletions

View file

@ -65,22 +65,20 @@ from ansible.module_utils.basic import AnsibleModule
def main():
module = AnsibleModule(
argument_spec=dict(
arguments=dict(type='list', elements='str'),
arguments=dict(type="list", elements="str"),
),
supports_check_mode=True,
)
facter_path = module.get_bin_path(
'facter',
opt_dirs=['/opt/puppetlabs/bin'])
facter_path = module.get_bin_path("facter", opt_dirs=["/opt/puppetlabs/bin"])
cmd = [facter_path, "--json"]
if module.params['arguments']:
cmd += module.params['arguments']
if module.params["arguments"]:
cmd += module.params["arguments"]
rc, out, err = module.run_command(cmd, check_rc=True)
module.exit_json(ansible_facts=dict(facter=json.loads(out)))
if __name__ == '__main__':
if __name__ == "__main__":
main()