From 18e6c5134c8f2eed3367fb1fd4a73c099399e83c Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 27 May 2024 14:17:50 -0400 Subject: [PATCH] ansible: Add parameter to skip installing cross compilers Change-Id: I4e885ce54ef491660d0881230cd503088454b760 Signed-off-by: Kienan Stewart --- automation/ansible/roles/cross-compilers/defaults/main.yml | 1 + automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml | 1 + automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml | 1 + automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/automation/ansible/roles/cross-compilers/defaults/main.yml b/automation/ansible/roles/cross-compilers/defaults/main.yml index d50918b..0123d7b 100644 --- a/automation/ansible/roles/cross-compilers/defaults/main.yml +++ b/automation/ansible/roles/cross-compilers/defaults/main.yml @@ -1,3 +1,4 @@ --- compilers_legacy_install: true cross_compilers_debian_bookworm_snapshot: false +cross_compilers_install: true diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml index 64f96da..a216231 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml @@ -3,4 +3,5 @@ apk: update_cache=yes - name: Ensure cross-compilers packages are installed. + when: cross_compilers_install|default(true) apk: "name={{ cross_compilers_packages }} state=present" diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml index 95173f2..95add22 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml @@ -16,6 +16,7 @@ update_cache: true - name: Ensure cross-compilers packages are installed. + when: cross_compilers_install|default(true) ansible.builtin.apt: name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}" diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml b/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml index c8429d2..dd41075 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml @@ -1,5 +1,6 @@ --- - name: Ensure cross-compilers packages are installed. + when: cross_compilers_install|default(true) dnf: name: "{{ cross_compilers_packages }}" state: installed -- 2.34.1