blob: 755377e11e4ca8e63c708c2da63c579f99f77d65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#- name: Install monitoring applications
# package: name={{item}} state=present
# with_items:
# - sysstat
- name: "Deploy services"
copy: src="{{ item | quote }}" dest="/etc/systemd/system/{{ item | basename | quote }}" owner=root group=root mode=0755
with_fileglob:
- "{{ role_path }}/templates/services/*.service"
- name: "Deploy service templates"
template: src="{{ item | quote }}" dest="/etc/systemd/system/{{ script_name }}" owner=root group=root mode=0755
vars:
script_name: "{{ item | basename | regex_replace('\\.j2','') }}"
with_fileglob:
- "{{ role_path }}/templates/services/*.j2"
- name: Configure services on compute nodes
include_tasks: compute.yml
when: "'compute' in group_names"
- name: Reload SystemD service
systemd: daemon_reload="yes"
become: yes
|