new role for maintaining webserver
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 9s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 23s

This commit is contained in:
2026-03-07 00:14:42 -08:00
parent c6ac0b0cc3
commit 31b2471f1c
4 changed files with 27 additions and 0 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,2 @@
webadmin:
home: /home/webadmin