46 lines
989 B
YAML
46 lines
989 B
YAML
# 2023-10-01
|
|
# Tasks: systemd
|
|
---
|
|
|
|
- ansible.builtin.include_vars: systemd.yml
|
|
- ansible.builtin.include_vars: ../../roles/vm/vars/vault/ports.yml
|
|
- ansible.builtin.include_vars: ../../roles/vm/vars/vault/domain.yml
|
|
|
|
- name: Create all systemd required directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
owner: root
|
|
group: root
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
with_items:
|
|
- "{{ systemd_directories }}"
|
|
when:
|
|
- ansible_facts['system'] == "Linux"
|
|
tags:
|
|
- system
|
|
- systemd
|
|
- directories
|
|
- create
|
|
|
|
- name: "Process systemd templates"
|
|
ansible.builtin.template:
|
|
lstrip_blocks: true
|
|
trim_blocks: true
|
|
backup: yes
|
|
src: "{{ templates.local }}"
|
|
dest: "{{ templates.remote }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,g=r,o=r
|
|
with_items:
|
|
- "{{ systemd_templates }}"
|
|
loop_control:
|
|
loop_var: templates
|
|
when:
|
|
- ansible_facts['system'] == "Linux"
|
|
tags:
|
|
- system
|
|
- services
|
|
- systemd
|