k3s-ansible/roles/raspberrypi/tasks/prereq/Raspbian.yml

26 lines
761 B
YAML
Raw Normal View History

---
2020-05-30 17:21:34 +02:00
- name: Activating cgroup support
ansible.builtin.lineinfile:
path: /boot/cmdline.txt
2020-05-30 17:21:34 +02:00
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
backrefs: true
2020-07-30 18:02:00 +02:00
notify: reboot
2020-05-30 17:21:34 +02:00
- name: Flush iptables before changing to iptables-legacy
ansible.builtin.iptables:
flush: true
2020-07-30 18:02:00 +02:00
changed_when: false # iptables flush always returns changed
2020-05-19 09:13:29 +02:00
2020-05-30 17:21:34 +02:00
- name: Changing to iptables-legacy
community.general.alternatives:
2020-05-19 09:13:29 +02:00
path: /usr/sbin/iptables-legacy
name: iptables
2020-05-30 17:21:34 +02:00
register: ip4_legacy
2020-05-19 09:13:29 +02:00
2020-05-30 17:21:34 +02:00
- name: Changing to ip6tables-legacy
community.general.alternatives:
2020-05-19 09:13:29 +02:00
path: /usr/sbin/ip6tables-legacy
name: ip6tables
2020-05-30 17:21:34 +02:00
register: ip6_legacy