blob: 8dc2837fa4fc7f5bd7cb55cba02716742675016c (
plain) (
tree)
|
|
---
- name: generate relayd configuration
ansible.builtin.template:
src: relayd.conf.j2
dest: "{{ relayd_configuration_file }}"
owner: 0
group: 0
mode: "0640"
register: relayd_result_generate_configuration
- name: lint relayd configuration
ansible.builtin.command: "relayd -nf {{ relayd_configuration_file }}"
register: relayd_result_lint_configuration
changed_when:
- relayd_result_generate_configuration.changed
- relayd_result_lint_configuration.rc != 0
- name: restart relayd # noqa: no-handler
ansible.builtin.service:
name: relayd
state: restarted
when: relayd_result_generate_configuration.changed
or relayd_result_lint_configuration.changed
- name: enable relayd
ansible.builtin.service:
name: relayd
enabled: true
|