Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ansible file module to set sticky bit #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions files/1_1_21.sh

This file was deleted.

7 changes: 5 additions & 2 deletions tasks/section_1_Initial_Setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,13 @@
shell: |
df --local -P | awk '{if (NR!=1) print $6}' | xargs -I '{}' find '{}' -xdev -type d \( -perm -0002 -a ! -perm -1000 \) 2>/dev/null
register: output_1_1_21
changed_when: output_1_1_21.stdout_lines | length > 0
changed_when: false # read-only task
check_mode: no
- name: 1.1.21 Ensure sticky bit is set on all world-writable directories - fix
script: 1_1_21.sh
file:
path: "{{ item }}"
mode: 'a+t'
loop: "{{ output_1_1_21.stdout_lines }}"
when: output_1_1_21.stdout_lines | length > 0
tags:
- section1
Expand Down