new role for maintaining webserver
This commit is contained in:
1 parent
c6ac0b0cc3
commit
31b2471f1c
4 files changed
+27
No files matched your search
@@ -0,0 +1,4 @@
|
||||
- name: Restart host to apply any changes and clear out uptime stuff
|
||||
become: true
|
||||
ansible.builtin.reboot:
|
||||
msg: "Reboot initiated as a part of housekeeping"
|
||||
@@ -0,0 +1,13 @@
|
||||
- name: Run docker pull for latest images
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
cmd: docker compose pull
|
||||
chdir: "{{ webadmin.home }}/{{ item }}"
|
||||
loop:
|
||||
- services
|
||||
- name: Restart containers with newest container images
|
||||
ansible.builtin.command:
|
||||
cmd: docker compose up -d
|
||||
chdir: "{{ webadmin.home }}/{{ item }}"
|
||||
loop:
|
||||
- services
|
||||
@@ -0,0 +1,8 @@
|
||||
- name: Update all packages to ensure compliance with latest updates
|
||||
tags:
|
||||
- housekeeping
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
autoclean: true
|
||||
autoremove: true
|
||||
upgrade: safe
|
||||
@@ -0,0 +1,2 @@
|
||||
webadmin:
|
||||
home: /home/webadmin
|
||||
Reference in new issue
Block a user