Newer
Older
- name: Test for Raspbian
stat:
path: /boot/cmdline.txt
register: cmdline
- name: Activating cgroup on Raspbian
lineinfile:
path: /boot/cmdline.txt
regexp: '^(.*rootwait)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
backrefs: true
when:
- cmdline.stat.path is defined
- ansible_facts.architecture is search("arm")
- name: Flush iptables before changing iptables-legacy
- ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster")
- name: Changing to iptables-legacy for Raspbian Buster
alternatives:
path: /usr/sbin/iptables-legacy
name: iptables
register: ip6_legacy
when:
- ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster")
- name: Changing to ip6tables-legacy for Raspbian Buster
alternatives:
path: /usr/sbin/ip6tables-legacy
name: ip6tables
register: ip4_legacy
when:
- ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster")
- name: Rebooting on Raspbian
when:
- boot_cmdline is changed
- ansible_facts.architecture is search("arm")
- ip6_legacy is changed
- ip4_legacy is changed