Use the .yaml file extension for all YAML files
This commit is contained in:
parent
9d0697f0d0
commit
1bcb77961b
4 changed files with 1 additions and 1 deletions
5
playbooks/roles/ola/handlers/main.yaml
Normal file
5
playbooks/roles/ola/handlers/main.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
- name: Restart olad
|
||||
ansible.builtin.systemd:
|
||||
service: olad.service
|
||||
state: restarted
|
||||
daemon-reload: true
|
||||
22
playbooks/roles/ola/meta/argument_specs.yaml
Normal file
22
playbooks/roles/ola/meta/argument_specs.yaml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
argument_specs:
|
||||
main:
|
||||
options:
|
||||
ola__configs:
|
||||
description: A list of ola configurations.
|
||||
type: list
|
||||
elements: dict
|
||||
required: true
|
||||
options:
|
||||
name:
|
||||
description: >-
|
||||
The name of the configuration file, where the configuration should
|
||||
be deployed to. The file will be placed under `/etc/ola/` and
|
||||
`.conf` will be appended to the given name. So in the end the path
|
||||
will be like this: `/etc/ola/\{\ name \}\}.conf`.
|
||||
type: str
|
||||
required: true
|
||||
content:
|
||||
description: The content of the configuration.
|
||||
type: str
|
||||
required: true
|
||||
8
playbooks/roles/ola/meta/main.yaml
Normal file
8
playbooks/roles/ola/meta/main.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: distribution_check
|
||||
vars:
|
||||
distribution_check__supported_distributions:
|
||||
- name: Debian
|
||||
versions:
|
||||
- "11"
|
||||
17
playbooks/roles/ola/tasks/main.yaml
Normal file
17
playbooks/roles/ola/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
- name: Install ola
|
||||
ansible.builtin.apt:
|
||||
name: ola
|
||||
- name: Ensure all given configuraton files are deployed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ item.content }}"
|
||||
dest: /etc/ola/{{ item.name }}.conf
|
||||
mode: 0644
|
||||
owner: olad
|
||||
group: olad
|
||||
loop: "{{ ola__configs }}"
|
||||
notify: Restart olad
|
||||
- name: Enable and start ola service
|
||||
ansible.builtin.systemd:
|
||||
name: olad.service
|
||||
state: started
|
||||
enabled: true
|
||||
Loading…
Reference in a new issue