mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +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
|
||||
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:
|
||||
# Src and dest rsync "path" handling
|
||||
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)
|
||||
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:
|
||||
password = self._templar.template(password)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ DOCUMENTATION = '''
|
|||
|
||||
import csv
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
import threading
|
||||
|
|
@ -142,7 +143,7 @@ from functools import partial
|
|||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,5 +20,4 @@
|
|||
ansible.builtin.include_tasks: seboolean.yml
|
||||
when:
|
||||
- ansible_selinux is defined
|
||||
- ansible_selinux
|
||||
- ansible_selinux.status == 'enabled'
|
||||
|
|
|
|||
|
|
@ -19,23 +19,21 @@
|
|||
- name: Debug message for when SELinux is disabled
|
||||
ansible.builtin.debug:
|
||||
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
|
||||
ansible.builtin.debug:
|
||||
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
|
||||
ansible.builtin.include_tasks: selinux.yml
|
||||
when:
|
||||
- ansible_selinux is defined
|
||||
- ansible_selinux
|
||||
- ansible_selinux.status == 'enabled'
|
||||
|
||||
- name: Include tasks for selogin when SELinux is enabled
|
||||
ansible.builtin.include_tasks: selogin.yml
|
||||
when:
|
||||
- ansible_selinux is defined
|
||||
- ansible_selinux
|
||||
- ansible_selinux.status == 'enabled'
|
||||
|
|
|
|||
Loading…
Reference in a new issue