diff --git a/ansible/common_vars.yaml b/ansible/common_vars.yaml index 4cf90f2..a0f35d4 100644 --- a/ansible/common_vars.yaml +++ b/ansible/common_vars.yaml @@ -15,7 +15,8 @@ common_base_packages: - cifs-utils - curl - cups - - exa + - cron +# - exa - git - python3-pip - python3-setuptools @@ -25,4 +26,4 @@ common_base_packages: - vim - whois - jq - - net-tools \ No newline at end of file + - net-tools diff --git a/ansible/hosts.ini b/ansible/hosts.ini index f6f8a35..5b6670a 100644 --- a/ansible/hosts.ini +++ b/ansible/hosts.ini @@ -2,6 +2,7 @@ vm-media-100-55 ansible_host=192.168.100.55 ansible_user=tylen vm-tools-100-65 ansible_host=192.168.100.65 ansible_user=tylen vm-network-100-75 ansible_host=192.168.100.75 ansible_user=tylen +backup-vm-tahmidcloud ansible_host=tahmidcloud.com ansible_user=tylen ansible_port=42128 [misc] vm-printer-100-20 ansible_host=192.168.100.20 ansible_user=tylen diff --git a/ansible/worker/init.yaml b/ansible/worker/init.yaml index cc9ad3e..5b18090 100644 --- a/ansible/worker/init.yaml +++ b/ansible/worker/init.yaml @@ -40,12 +40,27 @@ - name: Reload systemd to apply changes command: systemctl daemon-reload + - name: Stop Docker service + service: + name: docker + state: stopped + - name: Start and enable Docker service: name: docker state: started enabled: yes + - name: Create cron job for Docker cleanup + cron: + name: "Docker Cleanup" + minute: "0" + hour: "4" + job: "docker system prune -a --volumes -f" + state: present + tags: + - cron + - name: Create a login user user: name: "{{ vm_username }}"