File tree Expand file tree Collapse file tree 4 files changed +26
-8
lines changed
playbooks/roles/bootlinux/tasks Expand file tree Collapse file tree 4 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 11---
2+ - name : Gather facts from localhost for dependency installation
3+ ansible.builtin.setup :
4+ filter : " ansible_os_family,ansible_distribution"
5+ delegate_to : localhost
6+ register : localhost_facts
7+ run_once : true
8+
9+ - name : Set localhost OS facts for 9P build
10+ ansible.builtin.set_fact :
11+ localhost_os_family : " {{ localhost_facts.ansible_facts.ansible_os_family }}"
12+ localhost_distribution : " {{ localhost_facts.ansible_facts.ansible_distribution }}"
13+ delegate_to : localhost
14+ run_once : true
15+
16+ - name : Refresh target host facts after localhost gathering
17+ ansible.builtin.setup :
18+ filter : " ansible_os_family,ansible_distribution,ansible_distribution_version"
19+
220- name : Install dependencies to build the Linux kernel
321 delegate_to : localhost
422 run_once : true
Original file line number Diff line number Diff line change 22- name : Debian-specific setup
33 ansible.builtin.import_tasks : debian/main.yml
44 when :
5- - ansible_os_family == "Debian"
5+ - localhost_os_family == "Debian"
66
77- name : SuSE-specific setup
88 ansible.builtin.import_tasks : suse/main.yml
99 when :
10- - ansible_os_family == "Suse"
10+ - localhost_os_family == "Suse"
1111
1212- name : Red Hat-specific setup
1313 ansible.builtin.import_tasks : redhat/main.yml
1414 when :
15- - ansible_os_family == "RedHat"
15+ - localhost_os_family == "RedHat"
Original file line number Diff line number Diff line change 33 ansible.builtin.include_role :
44 name : epel-release
55 when :
6- - ansible_distribution != "Fedora"
6+ - localhost_distribution != "Fedora"
77
88- name : Install packages we care about
99 become : true
6767 vars :
6868 packages :
6969 - btrfs-progs
70- when : ansible_distribution == 'Fedora'
70+ when : localhost_distribution == 'Fedora'
7171
7272- name : Install clang
7373 become : true
Original file line number Diff line number Diff line change 11---
22# tasks to install update-grub
33- name : Distro specific update of your GRUB boot file
4- ansible.builtin.import_tasks : debian.yml
4+ ansible.builtin.include_tasks : debian.yml
55 when : ansible_facts['os_family']|lower == 'debian'
6- - ansible.builtin.import_tasks : suse.yml
6+ - ansible.builtin.include_tasks : suse.yml
77 when : ansible_facts['os_family']|lower == 'suse'
8- - ansible.builtin.import_tasks : redhat.yml
8+ - ansible.builtin.include_tasks : redhat.yml
99 when : ansible_facts['os_family']|lower == 'redhat'
You can’t perform that action at this time.
0 commit comments