ansible/roles/common/tasks/systemd.yml

45 lines
920 B
YAML
Raw Normal View History

2023-09-25 08:40:20 +00:00
# 2023-09-25
# Tasks: systemd
---
- ansible.builtin.include_vars: systemd.yml
- ansible.builtin.include_vars: ../../roles/vm/vars/vault/ports.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