Jérémy Lecour
00fe225a3c
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2615|7|2608|177|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/278//ansiblelint">Evolix » ansible-roles » unstable #278</a>
gitea/ansible-roles/pipeline/head This commit looks good
22 lines
558 B
YAML
22 lines
558 B
YAML
---
|
|
|
|
- name: set unit name
|
|
ansible.builtin.set_fact:
|
|
vrrp_systemd_unit_name: "vrrp-{{ vrrp_address.id }}.service"
|
|
|
|
- name: add systemd unit
|
|
ansible.builtin.template:
|
|
src: vrrp.service.j2
|
|
dest: "/etc/systemd/system/{{ vrrp_systemd_unit_name }}"
|
|
force: true
|
|
register: vrrp_systemd_unit
|
|
|
|
- name: enable and start systemd unit
|
|
ansible.builtin.systemd:
|
|
name: "{{ vrrp_systemd_unit_name }}"
|
|
daemon_reload: yes
|
|
enabled: yes
|
|
state: "{{ vrrp_address.state }}"
|
|
when:
|
|
- vrrp_systemd_unit is changed
|
|
- not ansible_check_mode |