Compare commits

..

No commits in common. "df8413f3a04d9703469e71cfcd2c08ac5862090b" and "7f8505d6930c2490325e652c607ace4de77f585e" have entirely different histories.

3 changed files with 8 additions and 28 deletions

View file

@ -3,23 +3,8 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2024, Ansible Project # SPDX-FileCopyrightText: 2024, Ansible Project
# Use a more permissive profile due to documentation parsing issues
profile: min
skip_list: skip_list:
- meta-runtime[unsupported-version] # This rule doesn't make any sense - meta-runtime[unsupported-version] # Tis rule doesn't make any sense
- fqcn[deep] # This rule produces false positives for files in tests/unit/plugins/action/fixtures/ - fqcn[deep] # This rule produces false positives for files in tests/unit/plugins/action/fixtures/
- no-relative-paths # Temporary skip due to documentation parsing issue
- parser-error # Skip documentation parsing errors
- syntax-check # Skip syntax check issues in documentation
- load-failure # Skip module loading failures during documentation parsing
- args # Skip argument validation errors in documentation
exclude_paths: exclude_paths:
- changelogs/ - changelogs/
# Enable specific rules we want to keep
enable_list:
- yaml
- name
- var-naming

View file

@ -358,10 +358,7 @@ class SysctlModule(object):
if self.system_wide: if self.system_wide:
for sysctl_file in self.SYSCTL_DIRS: for sysctl_file in self.SYSCTL_DIRS:
for conf_file in glob.glob(sysctl_file): for conf_file in glob.glob(sysctl_file):
sysctl_args = [self.sysctl_cmd, '-p', conf_file] rc, out, err = self.module.run_command([self.sysctl_cmd, '-p', conf_file], environ_update=self.LANG_ENV)
if self.args['ignoreerrors']:
sysctl_args.insert(1, '-e')
rc, out, err = self.module.run_command(sysctl_args, environ_update=self.LANG_ENV)
if rc != 0 or self._stderr_failed(err): if rc != 0 or self._stderr_failed(err):
self.module.fail_json(msg="Failed to reload sysctl: %s" % to_native(out) + to_native(err)) self.module.fail_json(msg="Failed to reload sysctl: %s" % to_native(out) + to_native(err))
else: else:

View file

@ -140,10 +140,8 @@
ansible.posix.sysctl: ansible.posix.sysctl:
name: test.invalid name: test.invalid
value: 1 value: 1
reload: false
sysctl_set: true
ignore_errors: true
register: sysctl_test3 register: sysctl_test3
ignore_errors: true
- name: Debug sysctl_test3 - name: Debug sysctl_test3
ansible.builtin.debug: ansible.builtin.debug:
@ -263,7 +261,7 @@
ansible.builtin.assert: ansible.builtin.assert:
that: that:
- sysctl_system_test1 is changed - sysctl_system_test1 is changed
- "'10' in sysctl_check_system1.stdout" - sysctl_check_system1.stdout_lines == ["vm.swappiness = 10"]
# Test system_wide with reload=true # Test system_wide with reload=true
- name: Set vm.dirty_ratio to 20 with system_wide and reload=true - name: Set vm.dirty_ratio to 20 with system_wide and reload=true