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

Add no_log to every task that might expose a password #63

Open
wants to merge 1 commit into
base: master
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
1 change: 1 addition & 0 deletions tasks/chown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
owner: "{{ item.owner | default('www-data') }}"
group: "{{ item.group | default(item.owner) | default('www-data') }}"
recurse: true
no_log: true
with_items: "{{ wordpress_installs }}"
6 changes: 6 additions & 0 deletions tasks/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
failed_when: false
changed_when: false
with_items: "{{ wordpress_installs }}"
no_log: true
tags:
- wordpress-core-is-downloaded

Expand All @@ -18,6 +19,7 @@
changed_when: true
with_items: "{{ _check_download.results | default([]) }}"
when: item.rc != 0
no_log: true
tags:
- wordpress-core-downloaded

Expand All @@ -33,6 +35,7 @@
args:
creates: "{{ item.path }}/wp-config.php"
with_items: "{{ wordpress_installs }}"
no_log: true
tags:
- wordpress-core-configure

Expand All @@ -44,6 +47,7 @@
failed_when: false
changed_when: false
with_items: "{{ wordpress_installs }}"
no_log: true
tags:
- wordpress-core-is-installed

Expand All @@ -58,6 +62,7 @@
changed_when: true
with_items: "{{ _check_installation.results | default([]) }}"
when: item.rc != 0
no_log: true
tags:
- wordpress-core-install

Expand All @@ -67,5 +72,6 @@
--allow-root --no-color --path='{{ item.path }}'
changed_when: false
with_items: "{{ wordpress_installs }}"
no_log: true
tags:
- wordpress-core-install-check
3 changes: 3 additions & 0 deletions tasks/options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- "{{ wordpress_installs }}"
- options
when: item.1.command == 'add'
no_log: true
tags:
- wordpress-options-add

Expand All @@ -26,6 +27,7 @@
- "{{ wordpress_installs }}"
- options
when: item.1.command == 'update'
no_log: true
tags:
- wordpress-options-update

Expand All @@ -41,5 +43,6 @@
- "{{ wordpress_installs }}"
- options
when: item.1.command == 'delete'
no_log: true
tags:
- wordpress-options-delete
9 changes: 9 additions & 0 deletions tasks/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- "{{ wordpress_installs }}"
- plugins
when: item.1
no_log: true
tags:
- wordpress-plugins-is-installed-plugin

Expand All @@ -24,6 +25,7 @@
- not item.item.1.zip | default(false)
- not item.item.1.url | default(false)
- item.rc != 0
no_log: true
tags:
- wordpress-plugins-install-plugin
- wordpress-plugins-install-plugin-wordpress_org
Expand All @@ -41,6 +43,7 @@
- item.item.1.zip | default(false)
- not item.item.1.url | default(false)
- item.rc != 0
no_log: true
tags:
- wordpress-plugins-install-plugin
- wordpress-plugins-install-plugin-zip
Expand All @@ -57,11 +60,13 @@
- item.item.1.zip | default(false)
- not item.item.1.url | default(false)
- item.rc != 0
no_log: true
tags:
- wordpress-plugins-install-plugin
- wordpress-plugins-install-plugin-zip
- wordpress-plugins-install-plugin-zip-install


- name: plugins | install | url
ansible.builtin.command: >
wp-cli --allow-root --no-color --path='{{ item.item.0.path }}'
Expand All @@ -73,6 +78,7 @@
- not item.item.1.zip | default(false)
- item.item.1.url | default(false)
- item.rc != 0
no_log: true
tags:
- wordpress-plugins-install-plugin
- wordpress-plugins-install-plugin-url
Expand All @@ -85,6 +91,7 @@
- "{{ wordpress_installs }}"
- plugins
when: item.1.name
no_log: true
tags:
- wordpress-plugins-check-install-plugin

Expand All @@ -99,6 +106,7 @@
when:
- item.1.name
- item.1.activate | default(true)
no_log: true
tags:
- wordpress-plugins-activate-plugin

Expand All @@ -113,5 +121,6 @@
when:
- item.1.name
- not item.1.activate | default(true)
no_log: true
tags:
- wordpress-plugins-deactivate-plugin
1 change: 1 addition & 0 deletions tasks/queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
with_subelements:
- "{{ wordpress_installs | selectattr('queries', 'defined') | list }}"
- queries
no_log: true
tags:
- wordpress-queries-execute-queries
4 changes: 4 additions & 0 deletions tasks/themes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- "{{ wordpress_installs }}"
- themes
when: item.1.name
no_log: true
tags:
- wordpress-themes-is-installed-theme

Expand All @@ -21,6 +22,7 @@
when:
- item.item.1.name
- item.rc != 0
no_log: true
tags:
- wordpress-themes-install-theme

Expand All @@ -32,6 +34,7 @@
- "{{ wordpress_installs }}"
- themes
when: item.1.name
no_log: true
tags:
- wordpress-themes-install-theme-check

Expand All @@ -46,5 +49,6 @@
when:
- item.1.name
- item.1.activate | default(false)
no_log: true
tags:
- wordpress-themes-activate-theme
2 changes: 2 additions & 0 deletions tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
register: _check_copy_users
with_items: "{{ wordpress_installs }}"
when: item.users.src is defined
no_log: true
tags:
- wordpress-users-copy-file

Expand All @@ -24,5 +25,6 @@
changed_when: "'Success' in _check_installation_users.stdout"
with_items: "{{ _check_copy_users.results | default([]) }}"
when: item.changed
no_log: true
tags:
- wordpress-users-import-file
3 changes: 3 additions & 0 deletions tasks/wp-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
when:
- item.cron is defined
- item.cron.use_crond | default(false)
no_log: true
tags:
- wordpress-wp-cron-disable-wp-cron

Expand All @@ -20,6 +21,7 @@
state: absent
with_items: "{{ wordpress_installs }}"
when: item.cron is undefined or not item.cron.use_crond | default(false)
no_log: true
tags:
- wordpress-wp-cron-enable-wp-cron

Expand All @@ -36,5 +38,6 @@
cron_file: wp-cron
user: "{{ item.cron.user if item.cron is defined and item.cron.user is defined else 'www-data' }}"
with_items: "{{ wordpress_installs }}"
no_log: true
tags:
- wordpress-wp-cron-enable-crond