Externalize zram role
This commit is contained in:
commit
4a1e6c8cb3
3 changed files with 104 additions and 0 deletions
13
tasks/main.yml
Normal file
13
tasks/main.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: Install script zram-swap.sh
|
||||
copy: src=files/usr/local/sbin/zram-swap.sh dest=/usr/local/sbin/zram-swap.sh owner=root group=root mode=0755
|
||||
- name: Install service zram-config.service
|
||||
copy: src=files/etc/systemd/system/zram-config.service dest=/etc/systemd/system/zram-config.service owner=root group=root mode=0644
|
||||
when: ansible_service_mgr == "systemd"
|
||||
- name: Install zram-config link service in init.d
|
||||
file: src=/usr/local/sbin/zram-swap.sh dest=/etc/init.d/zram-config owner=root group=root state=link
|
||||
when: ansible_service_mgr != "systemd"
|
||||
- name: start zram-config service
|
||||
service: name=zram-config enabled=yes state=started
|
||||
# when: ansible_service_mgr == "systemd"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue