fix: fix os specific tasks
This commit is contained in:
parent
fc14afec55
commit
30612d3c82
12
tasks/debian.yml
Normal file
12
tasks/debian.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: Uninstall packages
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
|
||||||
|
|
||||||
|
- name: Install common packages
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ packages_install + packages_install_extra }}"
|
@ -6,24 +6,10 @@
|
|||||||
loop: "{{ packages_uninstall_pre + packages_uninstall_pre_extra }}"
|
loop: "{{ packages_uninstall_pre + packages_uninstall_pre_extra }}"
|
||||||
|
|
||||||
- name: Include OS specific tasks
|
- name: Include OS specific tasks
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks: "{{ lookup('first_found', params) }}"
|
||||||
file: "{{ item }}"
|
vars:
|
||||||
with_first_found:
|
params:
|
||||||
- paths:
|
|
||||||
- "tasks"
|
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_os_family | lower }}.yml"
|
||||||
skip: True
|
paths:
|
||||||
|
- "tasks"
|
||||||
- name: Uninstall packages
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: absent
|
|
||||||
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
|
|
||||||
|
|
||||||
- name: Install packages
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ item }}"
|
|
||||||
enablerepo: "{{ packages_enablerepo }}"
|
|
||||||
state: present
|
|
||||||
loop: "{{ packages_install + packages_install_extra }}"
|
|
||||||
|
@ -33,3 +33,16 @@
|
|||||||
notify:
|
notify:
|
||||||
- __packages_upgrade
|
- __packages_upgrade
|
||||||
- __packages_clean_metadata
|
- __packages_clean_metadata
|
||||||
|
|
||||||
|
- name: Uninstall packages
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
|
||||||
|
|
||||||
|
- name: Install common packages
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
enablerepo: "{{ packages_enablerepo }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ packages_install + packages_install_extra }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user