Use ipaddr filter instead of string manipulation
This commit is contained in:
parent
bd18ce3d22
commit
1269427fb2
3 changed files with 21 additions and 28 deletions
|
@ -8,12 +8,12 @@ server:
|
|||
|
||||
outgoing-range: {{ ( 1024 / ansible_processor_cores | int - 50 ) | int }}
|
||||
|
||||
interface: {{ intnet_prefix }}.10@53
|
||||
interface: {{ intnet_prefix }}.10@853
|
||||
interface: {{ intnet_prefix }}.11@53
|
||||
interface: {{ intnet_prefix }}.11@853
|
||||
interface: {{ intnet_prefix }}.12@53
|
||||
interface: {{ intnet_prefix }}.12@853
|
||||
interface: {{ intnet | ansible.utils.ipaddr(10) | ansible.utils.ipaddr('address') }}@53
|
||||
interface: {{ intnet | ansible.utils.ipaddr(10) | ansible.utils.ipaddr('address') }}@853
|
||||
interface: {{ intnet | ansible.utils.ipaddr(11) | ansible.utils.ipaddr('address') }}@53
|
||||
interface: {{ intnet | ansible.utils.ipaddr(11) | ansible.utils.ipaddr('address') }}@853
|
||||
interface: {{ intnet | ansible.utils.ipaddr(12) | ansible.utils.ipaddr('address') }}@53
|
||||
interface: {{ intnet | ansible.utils.ipaddr(12) | ansible.utils.ipaddr('address') }}@853
|
||||
|
||||
tls-service-key: {{ tls_private }}/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh.key
|
||||
tls-service-pem: {{ tls_certs }}/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh.crt
|
||||
|
@ -21,7 +21,7 @@ server:
|
|||
|
||||
access-control: 127.0.0.0/8 allow
|
||||
access-control: ::1 allow
|
||||
access-control: {{ intnet_prefix }}.0/{{ (intnet_prefix + '.0/' + intnet_netmask) | ansible.utils.ipaddr('prefix') }} allow
|
||||
access-control: {{ intnet | ansible.utils.ipaddr(0) }} allow
|
||||
|
||||
extended-statistics: yes
|
||||
verbosity: 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue