mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Compare commits
2 commits
2cbd5b93fb
...
35c3727ddd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35c3727ddd | ||
|
|
413ab782a8 |
1 changed files with 12 additions and 1 deletions
|
|
@ -7,10 +7,16 @@
|
||||||
state: touch
|
state: touch
|
||||||
path: "{{ output_dir | expanduser }}/file_permissions"
|
path: "{{ output_dir | expanduser }}/file_permissions"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
|
||||||
mode: '0000'
|
mode: '0000'
|
||||||
|
|
||||||
|
- name: Create unprivileged user
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: nopriv
|
||||||
|
create_home: true
|
||||||
|
|
||||||
- name: Try to delete a key from an unreadable file
|
- name: Try to delete a key from an unreadable file
|
||||||
|
become: true
|
||||||
|
become_user: nopriv
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: root
|
user: root
|
||||||
key: "{{ dss_key_basic }}"
|
key: "{{ dss_key_basic }}"
|
||||||
|
|
@ -28,3 +34,8 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: absent
|
state: absent
|
||||||
path: "{{ output_dir | expanduser }}/file_permissions"
|
path: "{{ output_dir | expanduser }}/file_permissions"
|
||||||
|
|
||||||
|
- name: Remove the user
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: nopriv
|
||||||
|
state: absent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue