From: Michael Jeanson Date: Fri, 26 Apr 2024 18:09:29 +0000 (-0400) Subject: ansible: add support for ansible 2.16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4302b78305ad469fbc474e5eea554e5f1b5e406e;p=lttng-ci.git ansible: add support for ansible 2.16 Convert deprecated 'include' to 'ansible.builtin.include_tasks' and while we are here, add the 'ansible.builtin' prefix to 'include_vars'. Change-Id: I10c06ab9436a8edd23922f1b0b57fb063f3b387c Signed-off-by: Michael Jeanson --- diff --git a/automation/ansible/roles/babeltrace/tasks/main.yml b/automation/ansible/roles/babeltrace/tasks/main.yml index 177603e..f392c0e 100644 --- a/automation/ansible/roles/babeltrace/tasks/main.yml +++ b/automation/ansible/roles/babeltrace/tasks/main.yml @@ -1,7 +1,7 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml" - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" @@ -9,14 +9,14 @@ - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/binutils-gdb/tasks/main.yml b/automation/ansible/roles/binutils-gdb/tasks/main.yml index cd37dff..182d047 100644 --- a/automation/ansible/roles/binutils-gdb/tasks/main.yml +++ b/automation/ansible/roles/binutils-gdb/tasks/main.yml @@ -1,21 +1,21 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/common-node/tasks/main.yml b/automation/ansible/roles/common-node/tasks/main.yml index 28f2a27..0fddb5a 100644 --- a/automation/ansible/roles/common-node/tasks/main.yml +++ b/automation/ansible/roles/common-node/tasks/main.yml @@ -1,7 +1,7 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml" - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" @@ -9,16 +9,16 @@ - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' - when: common_node_rootfs_readonly_reboot|default(false) diff --git a/automation/ansible/roles/common/tasks/main.yml b/automation/ansible/roles/common/tasks/main.yml index 105eb40..6a562d4 100644 --- a/automation/ansible/roles/common/tasks/main.yml +++ b/automation/ansible/roles/common/tasks/main.yml @@ -1,7 +1,7 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml" - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" @@ -9,24 +9,24 @@ - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' -- include: setup-Windows.yml +- ansible.builtin.include_tasks: setup-Windows.yml when: ansible_os_family == 'Windows' # Setup user accounts -- include: users.yml +- ansible.builtin.include_tasks: users.yml when: ansible_os_family != 'Windows' -- include: users-Windows.yml +- ansible.builtin.include_tasks: users-Windows.yml when: ansible_os_family == 'Windows' diff --git a/automation/ansible/roles/compilers/tasks/main.yml b/automation/ansible/roles/compilers/tasks/main.yml index 099aa34..cb70c55 100644 --- a/automation/ansible/roles/compilers/tasks/main.yml +++ b/automation/ansible/roles/compilers/tasks/main.yml @@ -1,7 +1,7 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml" @@ -9,14 +9,14 @@ - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/cross-compilers/tasks/main.yml b/automation/ansible/roles/cross-compilers/tasks/main.yml index 77edc5b..02c7135 100644 --- a/automation/ansible/roles/cross-compilers/tasks/main.yml +++ b/automation/ansible/roles/cross-compilers/tasks/main.yml @@ -1,7 +1,7 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml" @@ -9,11 +9,11 @@ - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' diff --git a/automation/ansible/roles/librseq/tasks/main.yml b/automation/ansible/roles/librseq/tasks/main.yml index cd37dff..182d047 100644 --- a/automation/ansible/roles/librseq/tasks/main.yml +++ b/automation/ansible/roles/librseq/tasks/main.yml @@ -1,21 +1,21 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/libs-i386/tasks/main.yml b/automation/ansible/roles/libs-i386/tasks/main.yml index 0697151..c9b1196 100644 --- a/automation/ansible/roles/libs-i386/tasks/main.yml +++ b/automation/ansible/roles/libs-i386/tasks/main.yml @@ -1,14 +1,14 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ ansible_os_family }}.yml" + ansible.builtin.include_vars: "{{ ansible_os_family }}.yml" - name: Define libs_i386_packages. set_fact: libs_i386_packages: "{{ __libs_i386_packages | list }}" when: libs_i386_packages is not defined -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' # Install libs from the default package manager diff --git a/automation/ansible/roles/liburcu/tasks/main.yml b/automation/ansible/roles/liburcu/tasks/main.yml index cd37dff..182d047 100644 --- a/automation/ansible/roles/liburcu/tasks/main.yml +++ b/automation/ansible/roles/liburcu/tasks/main.yml @@ -1,21 +1,21 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/lttng-modules/tasks/main.yml b/automation/ansible/roles/lttng-modules/tasks/main.yml index 1a31309..a30f1c8 100644 --- a/automation/ansible/roles/lttng-modules/tasks/main.yml +++ b/automation/ansible/roles/lttng-modules/tasks/main.yml @@ -1,23 +1,23 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' - name: checkout repo diff --git a/automation/ansible/roles/lttng-tools/tasks/main.yml b/automation/ansible/roles/lttng-tools/tasks/main.yml index cd37dff..182d047 100644 --- a/automation/ansible/roles/lttng-tools/tasks/main.yml +++ b/automation/ansible/roles/lttng-tools/tasks/main.yml @@ -1,21 +1,21 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/lttng-ust/tasks/main.yml b/automation/ansible/roles/lttng-ust/tasks/main.yml index cd37dff..182d047 100644 --- a/automation/ansible/roles/lttng-ust/tasks/main.yml +++ b/automation/ansible/roles/lttng-ust/tasks/main.yml @@ -1,21 +1,21 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" # Setup/install tasks. -- include: setup-RedHat.yml +- ansible.builtin.include_tasks: setup-RedHat.yml when: ansible_os_family in ['RedHat', 'Rocky'] -- include: setup-Debian.yml +- ansible.builtin.include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- include: setup-Alpine.yml +- ansible.builtin.include_tasks: setup-Alpine.yml when: ansible_os_family == 'Alpine' -- include: setup-Suse.yml +- ansible.builtin.include_tasks: setup-Suse.yml when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/rasdaemon/tasks/main.yml b/automation/ansible/roles/rasdaemon/tasks/main.yml index c2c8657..672537a 100644 --- a/automation/ansible/roles/rasdaemon/tasks/main.yml +++ b/automation/ansible/roles/rasdaemon/tasks/main.yml @@ -7,4 +7,4 @@ name: rasdaemon state: started enabled: true -- ansible.builtin.include: prometheus.yml +- ansible.builtin.include_tasks: prometheus.yml