mirror of
https://github.com/trailofbits/algo.git
synced 2025-08-02 19:03:04 +02:00
Ensure Ansible is not being run in a world writable directory
This commit is contained in:
parent
52ffa9394b
commit
44cc720970
1 changed files with 10 additions and 0 deletions
10
main.yml
10
main.yml
|
@ -2,6 +2,16 @@
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
become: false
|
become: false
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Playbook dir stat
|
||||||
|
stat:
|
||||||
|
path: "{{ playbook_dir }}"
|
||||||
|
register: _playbook_dir
|
||||||
|
|
||||||
|
- name: Ensure Ansible is not being run in a world writable directory
|
||||||
|
assert:
|
||||||
|
that: _playbook_dir.stat.mode|int <= 0775
|
||||||
|
msg: Ansible is being run in a world writable directory ({{ playbook_dir }}), ignoring it as an ansible.cfg source. For more information see https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
|
||||||
|
|
||||||
- name: Ensure the requirements installed
|
- name: Ensure the requirements installed
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ '' | ipaddr }}"
|
msg: "{{ '' | ipaddr }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue