2016-06-13 16:24:30 +02:00
|
|
|
---
|
2016-12-14 15:16:24 +01:00
|
|
|
- block:
|
|
|
|
- name: Install the gcore boot script
|
|
|
|
template: src=gcore.j2 dest=/etc/init.d/{{ item }} owner=root group=root mode=0755
|
|
|
|
with_items: 'gcore'
|
|
|
|
|
|
|
|
- name: Install the start script inside the users home directory
|
|
|
|
copy: src={{ gcoreboot_startcontainer }} dest=/home/{{ item }}/{{ gcoreboot_startcontainer }} owner={{ item }} group={{ item }} mode=0755
|
|
|
|
with_items: '{{ gcore_users }}'
|
|
|
|
|
|
|
|
- name: Install the stop script inside the users home directory
|
|
|
|
copy: src={{ gcoreboot_stopcontainer }} dest=/home/{{ item }}/{{ gcoreboot_stopcontainer }} owner={{ item }} group={{ item }} mode=0755
|
|
|
|
with_items: '{{ gcore_users }}'
|
|
|
|
|
|
|
|
- name: Enable the gcore boot script
|
|
|
|
file: src=/etc/init.d/{{ item.path }} dest=/etc/{{ item.dest }} state=link
|
|
|
|
with_items:
|
|
|
|
- { path: 'gcore', dest: 'rc2.d/S95gcore' }
|
|
|
|
- { path: 'gcore', dest: 'rc3.d/S95gcore' }
|
|
|
|
- { path: 'gcore', dest: 'rc0.d/K25gcore' }
|
|
|
|
- { path: 'gcore', dest: 'rc1.d/K25gcore' }
|
2016-06-13 16:24:30 +02:00
|
|
|
|
2016-12-14 15:16:24 +01:00
|
|
|
when: gcoreboot_install
|
2016-06-13 16:24:30 +02:00
|
|
|
tags: [ 'gcoreboot' ]
|
|
|
|
|
2016-12-14 15:16:24 +01:00
|
|
|
- block:
|
|
|
|
- name: Remove the gcore boot script
|
|
|
|
file: dest=/etc/init.d/{{ item }} state=absent
|
|
|
|
with_items: 'gcore'
|
|
|
|
|
|
|
|
- name: disable the gcore boot script
|
|
|
|
file: dest=/etc/{{ item.dest }} state=absent
|
|
|
|
with_items:
|
|
|
|
- { path: 'gcore', dest: 'rc2.d/S95gcore' }
|
|
|
|
- { path: 'gcore', dest: 'rc3.d/S95gcore' }
|
|
|
|
- { path: 'gcore', dest: 'rc0.d/K25gcore' }
|
|
|
|
- { path: 'gcore', dest: 'rc1.d/K25gcore' }
|
|
|
|
|
|
|
|
when: not gcoreboot_install
|
|
|
|
tags: [ 'gcoreboot' ]
|