mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-29 10:45:42 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
38
roles/g2cs/tasks/install.yml
Normal file
38
roles/g2cs/tasks/install.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
|
||||
- name: Install dependencies
|
||||
yum:
|
||||
name:
|
||||
- perl-IO
|
||||
- perl-Getopt-Long
|
||||
tags: cs
|
||||
|
||||
- name: Install main script
|
||||
copy: src=g2cs.pl dest=/usr/local/bin/g2cs mode=755
|
||||
notify: restart g2cs
|
||||
tags: cs
|
||||
|
||||
- name: Deploy systemd unit
|
||||
template: src=g2cs.service.j2 dest=/etc/systemd/system/g2cs.service
|
||||
notify: restart g2cs
|
||||
register: g2cs_unit
|
||||
tags: cs
|
||||
|
||||
- name: Reload systemd
|
||||
systemd: daemon_reload=True
|
||||
when: g2cs_unit.changed
|
||||
tags: cs
|
||||
|
||||
- name: Deploy tmpfiles.d config
|
||||
copy:
|
||||
content: |
|
||||
d /run/g2cs 0755 g2cs g2cs - -
|
||||
d /run/g2cs/logs 0700 g2cs g2cs - -
|
||||
dest: /etc/tmpfiles.d/g2cs.conf
|
||||
register: g2cs_tmpfiles
|
||||
tags: cs
|
||||
|
||||
- name: Create tmpfiles dir
|
||||
command: systemd-tmpfiles --create
|
||||
when: g2cs_tmpfiles.changed
|
||||
tags: cs
|
Reference in New Issue
Block a user