coding
This commit is contained in:
parent
5c06670ed7
commit
17b9117efd
|
@ -1,2 +1,3 @@
|
||||||
---
|
---
|
||||||
# handlers file for openbsd-carp
|
- name: start carp{{ carp.num }}
|
||||||
|
command: "sh /etc/netstart carp{{ carp.num }}"
|
||||||
|
|
|
@ -9,3 +9,14 @@
|
||||||
name: net.inet.carp.preempt
|
name: net.inet.carp.preempt
|
||||||
value: '1'
|
value: '1'
|
||||||
when: openbsd_carp_preempt
|
when: openbsd_carp_preempt
|
||||||
|
|
||||||
|
- name: Configure carp{{ carp.num }}
|
||||||
|
template:
|
||||||
|
src: hostname.carp.j2
|
||||||
|
dest: /etc/hostname.carp{{ carp.num }}
|
||||||
|
notify: start carp{{ carp.num }}
|
||||||
|
loop: "{{ openbsd_carp | flatten(level=1) }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: carp
|
||||||
|
|
||||||
|
- meta: flush_handlers
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
inet {{ carp.ip | ipaddr('address') }} {{ carp.ip | ipaddr('netmask') }} {{ carp.ip | ipaddr('broadcast') }}
|
||||||
|
vhid {{ carp.vhid }}
|
||||||
|
carpdev {{ carp.interface }}
|
||||||
|
pass "{{ carp.password }}"
|
||||||
|
{% if carp.description is defined %}
|
||||||
|
description "{{ carp.description }}"
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue