ipaddr was moved to ansible.utils
This commit is contained in:
parent
8276c6e8b4
commit
32ddf5e58e
9 changed files with 16 additions and 16 deletions
|
|
@ -2,7 +2,7 @@
|
|||
win_shell: >
|
||||
New-NetIPAddress -InterfaceAlias {{ interface.name }}
|
||||
-AddressFamily IPv{{ address.family.value }}
|
||||
-IPAddress "{{ address.address | ipaddr("address") }}" -PrefixLength {{ address.address | ipaddr("prefix") }}
|
||||
-IPAddress "{{ address.address | ansible.utils.ipaddr("address") }}" -PrefixLength {{ address.address | ansible.utils.ipaddr("prefix") }}
|
||||
register: result
|
||||
changed_when: "not result.stderr or 'Instance MSFT_NetIPAddress already exists' not in result.stderr"
|
||||
failed_when: false
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
New-NetRoute -InterfaceAlias {{ interface.name }}
|
||||
-AddressFamily IPv{{ address.family.value }}
|
||||
-DestinationPrefix {{ "0.0.0.0/0" if address.family.value == 4 else "::/0" }}
|
||||
-NextHop {{ prefix.custom_fields.gateway.address | ipaddr("address") }}
|
||||
-NextHop {{ prefix.custom_fields.gateway.address | ansible.utils.ipaddr("address") }}
|
||||
register: result
|
||||
changed_when: "not result.stderr or 'Instance MSFT_NetRoute already exists' not in result.stderr"
|
||||
failed_when: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue