Compare commits

...

4 commits

Author SHA1 Message Date
David K.
20e616ac4c
Merge 3fe65ff1b1 into 96ec2097cc 2025-04-17 13:05:23 +09:00
softwarefactory-project-zuul[bot]
96ec2097cc
Merge pull request #631 from saito-hideki/issue/630
Fixes issue related to latest ansible-core devel branch

SUMMARY
Fixes a bug related to updating the ansible-core devel branch.

Fixes incorrect load path for json module in cgroup_perf_recap
Remove unnecessary condition from seboolean integration tests
Optimize conditions for selinux integration tests
Fixes #630

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ansible.posix.cgroup_perf_recap

ADDITIONAL INFORMATION
N/A
2025-04-17 00:34:06 +00:00
Hideki Saito
7b9b1f4957
Fixes issue related to updating the ansible-core devel branch
* Fixes incorrect load path for json module in cgroup_perf_recap
* Remove unnecessary condition from seboolean integration tests
* Optimize conditions for selinux integration tests
* Fixes #630

Signed-off-by: Hideki Saito <saito@fgrep.org>
2025-04-17 00:11:31 +00:00
David K
3fe65ff1b1 Add ansible_ssh_password as alias for ansible_ssh_pass variable
ssh connection reads password from variables ansible_password, ansible_ssh_pass and ansible_ssh_password. In synchronize ansible_ssh_password was missing.
2024-10-11 21:42:08 +02:00
5 changed files with 16 additions and 8 deletions

View 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).

View file

@ -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:

View file

@ -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

View file

@ -20,5 +20,4 @@
ansible.builtin.include_tasks: seboolean.yml
when:
- ansible_selinux is defined
- ansible_selinux
- ansible_selinux.status == 'enabled'

View file

@ -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'