Fixed conflicts between upstream and master.

This commit is contained in:
David Putzolu 2020-05-31 09:10:38 -07:00
commit 26a6c52add
2 changed files with 22 additions and 27 deletions

View File

@ -22,11 +22,9 @@
group: root group: root
mode: 0755 mode: 0755
when: when:
( ansible_facts.architecture is search("arm") - ( ansible_facts.architecture is search("arm") and
and ansible_facts.userspace_bits == "64" ) or
ansible_facts.userspace_bits == "64" ) ansible_facts.architecture is search("aarch64")
or
ansible_facts.architecture == "aarch64"
- name: Download k3s binary armhf - name: Download k3s binary armhf
get_url: get_url:

View File

@ -1,47 +1,44 @@
--- ---
- name: Test for Raspbian - name: Test for Raspbian
stat: set_fact:
path: /boot/cmdline.txt raspbian: '{% if
register: cmdline ( ansible_facts.architecture is search("arm") and
ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster") ) or
( ansible_facts.architecture is search("aarch64") and
ansible_facts.lsb.description is match("Debian.*buster") ) %}true{% else %}false{% endif %}'
- name: Activating cgroup on Raspbian - name: Activating cgroup support
lineinfile: lineinfile:
path: /boot/cmdline.txt path: /boot/cmdline.txt
regexp: '^(.*rootwait)$' regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory' line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
backrefs: true backrefs: true
when: when:
- cmdline.stat.path is defined - raspbian is true
- ansible_facts.architecture is search("arm")
register: boot_cmdline
- name: Flush iptables before changing iptables-legacy - name: Flush iptables before changing to iptables-legacy
iptables: iptables:
flush: true flush: true
when: when:
- ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster") - raspbian is true
- name: Changing to iptables-legacy for Raspbian Buster - name: Changing to iptables-legacy
alternatives: alternatives:
path: /usr/sbin/iptables-legacy path: /usr/sbin/iptables-legacy
name: iptables name: iptables
register: ip6_legacy register: ip4_legacy
when: when:
- ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster") - raspbian is true
- name: Changing to ip6tables-legacy for Raspbian Buster - name: Changing to ip6tables-legacy
alternatives: alternatives:
path: /usr/sbin/ip6tables-legacy path: /usr/sbin/ip6tables-legacy
name: ip6tables name: ip6tables
register: ip4_legacy register: ip6_legacy
when: when:
- ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster") - raspbian is true
- name: Rebooting on Raspbian - name: Rebooting
reboot: reboot:
when: when:
- boot_cmdline is changed - raspbian is true
- ansible_facts.architecture is search("arm")
- ip6_legacy is changed
- ip4_legacy is changed