diff --git a/roles/bootstrap-os/tasks/debian.yml b/roles/bootstrap-os/tasks/debian.yml index 9ede45f9b..9b18baa06 100644 --- a/roles/bootstrap-os/tasks/debian.yml +++ b/roles/bootstrap-os/tasks/debian.yml @@ -62,23 +62,3 @@ - '"changed its" in bootstrap_update_apt_result.stdout' - '"value from" in bootstrap_update_apt_result.stdout' ignore_errors: true - -- name: Check unattended-upgrades file exist - stat: - path: /etc/apt/apt.conf.d/50unattended-upgrades - register: unattended_upgrades_file_stat - when: - - os_release_dict['ID'] == 'ubuntu' - - ubuntu_kernel_unattended_upgrades_disabled - -- name: Disable kernel unattended-upgrades - lineinfile: - path: "{{ unattended_upgrades_file_stat.stat.path }}" - insertafter: "Unattended-Upgrade::Package-Blacklist" - line: '"linux-";' - state: present - become: true - when: - - os_release_dict['ID'] == 'ubuntu' - - ubuntu_kernel_unattended_upgrades_disabled - - unattended_upgrades_file_stat.stat.exists diff --git a/roles/bootstrap-os/tasks/openEuler.yml b/roles/bootstrap-os/tasks/openEuler.yml deleted file mode 120000 index fa2c37f2a..000000000 --- a/roles/bootstrap-os/tasks/openEuler.yml +++ /dev/null @@ -1 +0,0 @@ -centos.yml \ No newline at end of file diff --git a/roles/bootstrap-os/tasks/openEuler.yml b/roles/bootstrap-os/tasks/openEuler.yml new file mode 100644 index 000000000..42551339a --- /dev/null +++ b/roles/bootstrap-os/tasks/openEuler.yml @@ -0,0 +1,3 @@ +--- +- name: Import Centos boostrap for openEuler + import_tasks: centos.yml diff --git a/roles/bootstrap-os/tasks/opensuse-leap.yml b/roles/bootstrap-os/tasks/opensuse-leap.yml deleted file mode 120000 index 389442aed..000000000 --- a/roles/bootstrap-os/tasks/opensuse-leap.yml +++ /dev/null @@ -1 +0,0 @@ -opensuse.yml \ No newline at end of file diff --git a/roles/bootstrap-os/tasks/opensuse-leap.yml b/roles/bootstrap-os/tasks/opensuse-leap.yml new file mode 100644 index 000000000..233f84865 --- /dev/null +++ b/roles/bootstrap-os/tasks/opensuse-leap.yml @@ -0,0 +1,3 @@ +--- +- name: Import Opensuse bootstrap + import_tasks: opensuse.yml diff --git a/roles/bootstrap-os/tasks/opensuse-tumbleweed.yml b/roles/bootstrap-os/tasks/opensuse-tumbleweed.yml deleted file mode 120000 index 389442aed..000000000 --- a/roles/bootstrap-os/tasks/opensuse-tumbleweed.yml +++ /dev/null @@ -1 +0,0 @@ -opensuse.yml \ No newline at end of file diff --git a/roles/bootstrap-os/tasks/opensuse-tumbleweed.yml b/roles/bootstrap-os/tasks/opensuse-tumbleweed.yml new file mode 100644 index 000000000..233f84865 --- /dev/null +++ b/roles/bootstrap-os/tasks/opensuse-tumbleweed.yml @@ -0,0 +1,3 @@ +--- +- name: Import Opensuse bootstrap + import_tasks: opensuse.yml diff --git a/roles/bootstrap-os/tasks/ubuntu.yml b/roles/bootstrap-os/tasks/ubuntu.yml deleted file mode 120000 index f1a5a89f1..000000000 --- a/roles/bootstrap-os/tasks/ubuntu.yml +++ /dev/null @@ -1 +0,0 @@ -debian.yml \ No newline at end of file diff --git a/roles/bootstrap-os/tasks/ubuntu.yml b/roles/bootstrap-os/tasks/ubuntu.yml new file mode 100644 index 000000000..545de9436 --- /dev/null +++ b/roles/bootstrap-os/tasks/ubuntu.yml @@ -0,0 +1,21 @@ +--- +- name: Import Debian bootstrap + import_tasks: debian.yml + +- name: Check unattended-upgrades file exist + stat: + path: /etc/apt/apt.conf.d/50unattended-upgrades + register: unattended_upgrades_file_stat + when: + - ubuntu_kernel_unattended_upgrades_disabled + +- name: Disable kernel unattended-upgrades + lineinfile: + path: "{{ unattended_upgrades_file_stat.stat.path }}" + insertafter: "Unattended-Upgrade::Package-Blacklist" + line: '"linux-";' + state: present + become: true + when: + - ubuntu_kernel_unattended_upgrades_disabled + - unattended_upgrades_file_stat.stat.exists