Skip to content
Snippets Groups Projects
Unverified Commit f9ebd45c authored by Max Gautier's avatar Max Gautier Committed by GitHub
Browse files

boostrap-os: use import_tasks instead of symlinks (#11508)

Working symlinks are dependant on git configuration (when using the playbook as
a git repository, which is common), precisely `git config
core.symlinks`.

While this is enabled by default, some company policies will disable it.

Instead, use import_tasks which should avoid that class of bugs.
parent 7f527f61
No related branches found
Tags v2.26.0
No related merge requests found
......@@ -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
centos.yml
\ No newline at end of file
---
- name: Import Centos boostrap for openEuler
import_tasks: centos.yml
opensuse.yml
\ No newline at end of file
---
- name: Import Opensuse bootstrap
import_tasks: opensuse.yml
opensuse.yml
\ No newline at end of file
---
- name: Import Opensuse bootstrap
import_tasks: opensuse.yml
debian.yml
\ No newline at end of file
---
- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment