1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00

Change apt package combinations

This commit is contained in:
L3D 2023-07-31 18:18:04 +02:00
parent 4057098444
commit b8936e46d1
Signed by: l3d
GPG key ID: CD08445BFF4313D1

View file

@ -15,40 +15,42 @@
- ansible_os_family == 'RedHat' and ansible_distribution_version | float >= 8 - ansible_os_family == 'RedHat' and ansible_distribution_version | float >= 8
- name: Create Package installation list - name: Create Package installation list
blocks: block:
- name: Create Package installation list
ansible.builtin.set_fact:
l3d_pkgs__install: "{{ l3d_pkgs__base }}"
- name: Adding Advances Packages to installation list - name: Adding Advances Packages to installation list
ansible.builtin.set_fact: ansible.builtin.set_fact:
l3d_pkgs__install: "{{ l3d_pkgs__install | ansible.builtin.combine(l3d_pkgs__advanced) }}" l3d_pkgs__advanced: []
when: when:
l3d_pkgs__install_advanced | bool not l3d_pkgs__install_advanced | bool
- name: Adding Python Packages to installation list - name: Adding Python Packages to installation list
ansible.builtin.set_fact: ansible.builtin.set_fact:
l3d_pkgs__install: "{{ l3d_pkgs__install | ansible.builtin.combine(l3d_pkgs__python) }}" ll3d_pkgs__python: []
when: when:
l3d_pkgs__install_python | bool not l3d_pkgs__install_python | bool
- name: Adding CLI Packages to installation list - name: Adding CLI Packages to installation list
ansible.builtin.set_fact: ansible.builtin.set_fact:
l3d_pkgs__install: "{{ l3d_pkgs__base | ansible.builtin.combine(l3d_pkgs__cli) }}" l3d_pkgs__cli: []
when: when:
l3d_pkgs__install_cli | bool not l3d_pkgs__install_cli | bool
- name: Adding extra Packages to installation list - name: Combine Lists
ansible.builtin.set_fact: ansible.builtin.set_fact:
l3d_pkgs__install: "{{ l3d_pkgs__base | ansible.builtin.combine(l3d_pkgs__install_extra_packages) }}" l3d_pkgs__install: "{{ l3d_pkgs__base + l3d_pkgs__advanced + l3d_pkgs__python + l3d_pkgs__cli + l3d_pkgs__install_extra_packages }}"
- name: Show l3d_pkgs__install on verbose run - name: Show l3d_pkgs__install on verbose run
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ l3d_pkgs__install }}" msg: "{{ l3d_pkgs__install }}"
verbosity: 1 verbosity: 1
rescue: rescue:
- name: Show l3d_pkgs__install on verbose run
ansible.builtin.debug:
msg: "{{ l3d_pkgs__install }}"
verbosity: 1
- name: Error Info
ansible.builtin.fail: ansible.builtin.fail:
msg: "Error creating list of packages for installation. Created list: {{ l3d_pkgs__install }}" msg: "Error creating list of packages for installation."
- name: Install selected Packages - name: Install selected Packages
become: true become: true