Skip to content
Snippets Groups Projects
Verified Commit 40362ab1 authored by Chris Croome's avatar Chris Croome
Browse files

apt tweaks

parent 2098d705
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ repos:
language: python
additional_dependencies:
# https://pypi.org/project/ansible/
- ansible==8.6.0
- ansible==8.6.1
# https://github.com/kellyjonbrazil/jc/releases
- jc==1.23.6
# https://github.com/jmespath/jmespath.py/tags
......
......@@ -84,7 +84,7 @@
DEFAULT_MANAGED_STR: "{{ php_ansible_managed }}"
register: php_preferences
- name: Upgrade everything and autoclean and autoremove when switching sources
- name: Update apt cache and autoclean and autoremove
block:
- name: Update apt cache # noqa: no-handler
......@@ -92,7 +92,7 @@
update_cache: true
cache_valid_time: 0
- name: Dist upgrade # noqa: no-handler
- name: Apt autoclean and autoremove # noqa: no-handler
ansible.builtin.apt:
upgrade: dist
autoclean: true
......@@ -124,7 +124,7 @@
label: "{{ path | basename }}"
register: php_repo_absent
- name: Upgrade everything and autoclean and autoremove when removing the sury repo
- name: Update apt cache and autoclean and autoremove
block:
- name: Update apt cache # noqa: no-handler
......@@ -132,9 +132,8 @@
update_cache: true
cache_valid_time: 0
- name: Dist upgrade # noqa: no-handler
- name: Apt autoclean and autoremove # noqa: no-handler
ansible.builtin.apt:
upgrade: dist
autoclean: true
autoremove: true
update_cache: false
......
......@@ -129,9 +129,16 @@
verbosity: "{% if ansible_check_mode | bool and php_pkg_present != [] %}1{% elif php_pkg_present != [] %}2{% else %}3{% endif %}"
when: php_packages_removed_second_run.changed | bool
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
cache_valid_time: 0
- name: Dist upgrade
ansible.builtin.apt:
upgrade: dist
autoclean: true
autoremove: true
update_cache: false
register: php_dist_upgrade
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment