--- # Install the gcore boot script - name: Install the gcore boot script template: src=gcore.j2 dest=/etc/init.d/{{ item }} owner=root group=root mode=0755 with_items: 'gcore' when: - gcoreboot_install tags: [ 'gcoreboot' ] - 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.d' } - { path: 'gcore', dest: 'rc1.d/K25gcore' } when: - gcoreboot_install tags: [ 'gcoreboot' ]