lint fixes

This commit is contained in:
Jill Rouleau 2024-05-09 11:58:24 -07:00
parent e5733c5e49
commit 83c4d2abd1

View file

@ -335,19 +335,20 @@
# Test sysctl: sysctl_file is symlink
- name: Create link source
copy:
ansible.builtin.copy:
content: |
# Testing Ansible Sysctl module on symlink.
dest: /tmp/ansible_sysctl_test.conf
mode: "0644"
- name: Create symlink to the conf file
file:
ansible.builtin.file:
src: /tmp/ansible_sysctl_test.conf
dest: /tmp/ansible_sysctl_test_symlink.conf
state: link
- name: Use sysctl module with symlink sysctl file
sysctl:
ansible.posix.sysctl:
name: 'kernel.randomize_va_space'
value: '1'
sysctl_file: /tmp/ansible_sysctl_test_symlink.conf
@ -356,12 +357,12 @@
reload: false
- name: Stat sysctl file
stat:
ansible.builtin.stat:
path: /tmp/ansible_sysctl_test_symlink.conf
register: stat_result
- name: Ensure the sysctl file remains a symlink
assert:
ansible.builtin.assert:
that:
- stat_result.stat.islnk is defined and stat_result.stat.islnk
- stat_result.stat.lnk_source == '/tmp/ansible_sysctl_test.conf'