mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +01:00
Compare commits
4 commits
9fc29e2b3b
...
20e616ac4c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20e616ac4c | ||
|
|
96ec2097cc | ||
|
|
7b9b1f4957 | ||
|
|
3fe65ff1b1 |
5 changed files with 16 additions and 8 deletions
6
changelogs/fragments/631_fixes_module_path.yml
Normal file
6
changelogs/fragments/631_fixes_module_path.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- ansible.posix.cgroup_perf_recap - fixes json module load path (https://github.com/ansible-collections/ansible.posix/issues/630).
|
||||||
|
trivial:
|
||||||
|
- ansible.posix.seboolean - remove unnecessary condition from seboolean integration tests (https://github.com/ansible-collections/ansible.posix/issues/630).
|
||||||
|
- ansible.posix.selinux - optimize conditions for selinux integration tests (https://github.com/ansible-collections/ansible.posix/issues/630).
|
||||||
|
|
@ -342,7 +342,9 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
# Determine if we need a user@ and a password
|
# Determine if we need a user@ and a password
|
||||||
user = None
|
user = None
|
||||||
password = task_vars.get('ansible_ssh_pass', None) or task_vars.get('ansible_password', None)
|
password = (task_vars.get('ansible_ssh_password', None)
|
||||||
|
or task_vars.get('ansible_ssh_pass', None)
|
||||||
|
or task_vars.get('ansible_password', None))
|
||||||
if not dest_is_local:
|
if not dest_is_local:
|
||||||
# Src and dest rsync "path" handling
|
# Src and dest rsync "path" handling
|
||||||
if boolean(_tmp_args.get('set_remote_user', 'yes'), strict=False):
|
if boolean(_tmp_args.get('set_remote_user', 'yes'), strict=False):
|
||||||
|
|
@ -372,7 +374,9 @@ class ActionModule(ActionBase):
|
||||||
src = self._process_origin(src_host, src, user)
|
src = self._process_origin(src_host, src, user)
|
||||||
dest = self._process_remote(_tmp_args, dest_host, dest, user, inv_port in localhost_ports)
|
dest = self._process_remote(_tmp_args, dest_host, dest, user, inv_port in localhost_ports)
|
||||||
|
|
||||||
password = dest_host_inventory_vars.get('ansible_ssh_pass', None) or dest_host_inventory_vars.get('ansible_password', None)
|
password = (dest_host_inventory_vars.get('ansible_ssh_password', None)
|
||||||
|
or dest_host_inventory_vars.get('ansible_ssh_pass', None)
|
||||||
|
or dest_host_inventory_vars.get('ansible_password', None))
|
||||||
if self._templar is not None:
|
if self._templar is not None:
|
||||||
password = self._templar.template(password)
|
password = self._templar.template(password)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ DOCUMENTATION = '''
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
import datetime
|
import datetime
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
|
|
@ -142,7 +143,7 @@ from functools import partial
|
||||||
|
|
||||||
from ansible.module_utils._text import to_bytes, to_text
|
from ansible.module_utils._text import to_bytes, to_text
|
||||||
from ansible.module_utils.six import with_metaclass
|
from ansible.module_utils.six import with_metaclass
|
||||||
from ansible.parsing.ajson import AnsibleJSONEncoder, json
|
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,4 @@
|
||||||
ansible.builtin.include_tasks: seboolean.yml
|
ansible.builtin.include_tasks: seboolean.yml
|
||||||
when:
|
when:
|
||||||
- ansible_selinux is defined
|
- ansible_selinux is defined
|
||||||
- ansible_selinux
|
|
||||||
- ansible_selinux.status == 'enabled'
|
- ansible_selinux.status == 'enabled'
|
||||||
|
|
|
||||||
|
|
@ -19,23 +19,21 @@
|
||||||
- name: Debug message for when SELinux is disabled
|
- name: Debug message for when SELinux is disabled
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: SELinux is disabled
|
msg: SELinux is disabled
|
||||||
when: ansible_selinux is defined and not ansible_selinux
|
when: ansible_selinux is defined and ansible_selinux.status == 'disabled'
|
||||||
|
|
||||||
- name: Debug message for when SELinux is enabled and not disabled
|
- name: Debug message for when SELinux is enabled and not disabled
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: SELinux is {{ ansible_selinux.status }}
|
msg: SELinux is {{ ansible_selinux.status }}
|
||||||
when: ansible_selinux is defined and ansible_selinux
|
when: ansible_selinux is defined
|
||||||
|
|
||||||
- name: Include_tasks for when SELinux is enabled
|
- name: Include_tasks for when SELinux is enabled
|
||||||
ansible.builtin.include_tasks: selinux.yml
|
ansible.builtin.include_tasks: selinux.yml
|
||||||
when:
|
when:
|
||||||
- ansible_selinux is defined
|
- ansible_selinux is defined
|
||||||
- ansible_selinux
|
|
||||||
- ansible_selinux.status == 'enabled'
|
- ansible_selinux.status == 'enabled'
|
||||||
|
|
||||||
- name: Include tasks for selogin when SELinux is enabled
|
- name: Include tasks for selogin when SELinux is enabled
|
||||||
ansible.builtin.include_tasks: selogin.yml
|
ansible.builtin.include_tasks: selogin.yml
|
||||||
when:
|
when:
|
||||||
- ansible_selinux is defined
|
- ansible_selinux is defined
|
||||||
- ansible_selinux
|
|
||||||
- ansible_selinux.status == 'enabled'
|
- ansible_selinux.status == 'enabled'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue