Commit | Line | Data |
---|---|---|
858e2403 MJ |
1 | --- |
2 | # Include variables and define needed variables. | |
3 | - name: Include OS-specific variables. | |
4 | 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 | - include: setup-RedHat.yml | |
13 | when: ansible_os_family in ['RedHat', 'Rocky'] | |
14 | ||
15 | - include: setup-Debian.yml | |
16 | when: ansible_os_family == 'Debian' | |
17 | ||
18 | - include: setup-Alpine.yml | |
19 | when: ansible_os_family == 'Alpine' | |
20 | ||
21 | - include: setup-Suse.yml | |
22 | when: ansible_os_family == 'Suse' | |
fe47937c KS |
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' |