feat: fix alpine part

This commit is contained in:
Simon Cornet 2025-10-24 20:26:44 +02:00
commit c437d3f5b2
2 changed files with 13 additions and 10 deletions

View file

@ -6,7 +6,6 @@
name: "{{ item }}" name: "{{ item }}"
state: "present" state: "present"
update_cache: true update_cache: true
cache_clean: true
when: 'ansible_os_family == "Alpine"' when: 'ansible_os_family == "Alpine"'
with_items: with_items:
- "bash" - "bash"
@ -19,3 +18,10 @@
- "tzdata" - "tzdata"
- "vim" - "vim"
- "wget" - "wget"
# clean cache
- name: "clean cache"
ansible.builtin.command:
cmd: "apk clean cache"
failed_when: false
changed_when: false

View file

@ -42,20 +42,17 @@
- "ansible_os_family =='Debian'" - "ansible_os_family =='Debian'"
tags: "swap" tags: "swap"
# apt
- name: "apt"
ansible.builtin.import_tasks: "apt/sources.yaml"
when: "ansible_os_family == 'Debian'"
tags: "apt"
# flush handler
- name: "flush handlers"
ansible.builtin.meta: "flush_handlers"
# apk # apk
- name: "apk" - name: "apk"
ansible.builtin.import_tasks: "apk/packages.yaml" ansible.builtin.import_tasks: "apk/packages.yaml"
when: "ansible_os_family == 'Alpine'" when: "ansible_os_family == 'Alpine'"
tags: "apk"
# apt
- name: "apt"
ansible.builtin.import_tasks: "apt/sources.yaml"
when: "ansible_os_family == 'Debian'"
tags: "apt" tags: "apt"
# flush handler # flush handler