ansible: add support for ansible 2.16
[lttng-ci.git] / automation / ansible / roles / common-node / tasks / main.yml
1 ---
2 # Include variables and define needed variables.
3 - name: Include OS-specific variables.
4 ansible.builtin.include_vars: "{{ item }}"
5 with_first_found:
6 - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml"
7 - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
8 - "{{ ansible_distribution }}.yml"
9 - "{{ ansible_os_family }}.yml"
10
11 # Setup/install tasks.
12 - ansible.builtin.include_tasks: setup-RedHat.yml
13 when: ansible_os_family in ['RedHat', 'Rocky']
14
15 - ansible.builtin.include_tasks: setup-Debian.yml
16 when: ansible_os_family == 'Debian'
17
18 - ansible.builtin.include_tasks: setup-Alpine.yml
19 when: ansible_os_family == 'Alpine'
20
21 - ansible.builtin.include_tasks: setup-Suse.yml
22 when: ansible_os_family == 'Suse'
23
24 - when: common_node_rootfs_readonly_reboot|default(false)
25 block:
26 - name: Install readonly reboot script
27 ansible.builtin.copy:
28 dest: '/usr/sbin/readonly_root_reboot.sh'
29 src: 'readonly_root_reboot.sh'
30 owner: 'root'
31 group: 'root'
32 mode: '0750'
33 - name: Add cronjob
34 ansible.builtin.cron:
35 name: 'readonly_root_reboot'
36 job: '/usr/sbin/readonly_root_reboot.sh'
37 cron_file: 'readonly_root_reboot'
38 minute: '*/10'
39 user: 'root'
This page took 0.032848 seconds and 4 git commands to generate.