-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added adhoc task for wordpress upgrade and new restic role
Signed-off-by: Fabian Arrotin <[email protected]>
- Loading branch information
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- hosts: hostgroup-role-wp | ||
become: True | ||
tasks: | ||
- name: Upgrading wordpress to latest version (or specific release) | ||
unarchive: | ||
src: "https://wordpress.org/wordpress-{{ wp_release | default('latest') }}.tar.gz" | ||
remote_src: yes | ||
dest: "{{ wp_local_path | default('/var/www/wordpress') }}" | ||
extra_opts: | ||
- --strip-components=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
- hosts: hostgroup-role-restic | ||
become: True | ||
pre_tasks: | ||
- name: Checking if no-ansible file is there | ||
stat: | ||
path: /etc/no-ansible | ||
register: no_ansible | ||
|
||
- name: Verifying if we can run ansible or not | ||
assert: | ||
that: | ||
- "not no_ansible.stat.exists" | ||
msg: "/etc/no-ansible file exists so skipping ansible run on this node" | ||
|
||
roles: | ||
- restic | ||
|
||
post_tasks: | ||
- name: Touching ansible-run (monitored by Zabbix) | ||
file: | ||
path: /var/log/ansible.run | ||
state: touch | ||
|