From: Kienan Stewart Date: Mon, 27 May 2024 18:17:50 +0000 (-0400) Subject: ansible: Add parameter to skip installing cross compilers X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=18e6c5134c8f2eed3367fb1fd4a73c099399e83c;p=lttng-ci.git ansible: Add parameter to skip installing cross compilers Change-Id: I4e885ce54ef491660d0881230cd503088454b760 Signed-off-by: Kienan Stewart --- 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