Unverified Commit 7069d51b authored by Erik Wilson's avatar Erik Wilson Committed by GitHub

Merge pull request #513 from tamsky/ansible/improve-raspbian-checks

Ansible: Test for Raspbian before assuming
parents 73b0e4c3 0642260b
---
- 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: ( ansible_facts.architecture is search "arm" )
when: ( cmdline.stat.path is defined )
and
( ansible_facts.architecture is search("arm") )
register: boot_cmdline
- name: Rebooting on Raspbian
shell: reboot now
ignore_errors: true
when: ( ansible_facts.architecture is search "arm" )
when: ( boot_cmdline | changed )
and
( ansible_facts.architecture is search("arm") )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment