mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Python code modernization, 5/n (#1165)
* Address raise-missing-from. * Address simplifiable-if-expression. * Address unnecessary-dunder-call. * Address unnecessary-pass. * Address use-list-literal. * Address unused-variable. * Address use-dict-literal.
This commit is contained in:
@@ -80,7 +80,7 @@ from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(dict(), supports_check_mode=True)
|
||||
module = AnsibleModule({}, supports_check_mode=True)
|
||||
|
||||
cpuset_path = "/proc/self/cpuset"
|
||||
mountinfo_path = "/proc/self/mountinfo"
|
||||
@@ -136,11 +136,11 @@ def main():
|
||||
container_type = "podman"
|
||||
|
||||
module.exit_json(
|
||||
ansible_facts=dict(
|
||||
ansible_module_running_in_container=container_id != "",
|
||||
ansible_module_container_id=container_id,
|
||||
ansible_module_container_type=container_type,
|
||||
)
|
||||
ansible_facts={
|
||||
"ansible_module_running_in_container": container_id != "",
|
||||
"ansible_module_container_id": container_id,
|
||||
"ansible_module_container_type": container_type,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user