playbook change

This commit is contained in:
vvzvlad 2024-09-08 19:35:35 +03:00
parent 0c4e9184f1
commit 265ecaf19a

View File

@ -84,18 +84,30 @@
echo "127.0.1.1 {{ serverid }}" >> /etc/hosts echo "127.0.1.1 {{ serverid }}" >> /etc/hosts
changed_when: false changed_when: false
- name: Update and upgrade apt - name: Update apt cache
ansible.builtin.apt: ansible.builtin.apt:
update_cache: true update_cache: true
upgrade: dist
force_apt_get: true
autoremove: true
register: apt_update_result register: apt_update_result
retries: 5 retries: 5
delay: 50 delay: 50
until: apt_update_result is succeeded until: apt_update_result is succeeded
async: "{{ 60 * 20 }}"
poll: 30 - name: Upgrade packages (dist-upgrade)
ansible.builtin.apt:
upgrade: dist
force_apt_get: true
register: apt_upgrade_result
retries: 5
delay: 50
until: apt_upgrade_result is succeeded
- name: Autoremove unused packages
ansible.builtin.apt:
autoremove: true
register: apt_autoremove_result
retries: 5
delay: 50
until: apt_autoremove_result is succeeded
- name: Install packages - name: Install packages
ansible.builtin.apt: ansible.builtin.apt: