Nov. 5th, 2021

amarao: (Default)

Добавил режим state=query.

Теперь можно сделать так:

    - name: Get ip information from agge interface
      amarao.ip.ip_address:
        name: agge
        state: query
      register: addr
    - debug: var=addr

и получить вот так:

"addr": {
    "addresses_v4": [
        "173.237.37.20/29"
    ],
    "addresses_v6": [
        "2600:9c00:3:2::/64",
        "2600:9c00:999::54/125",
        "fe80::b696:91ff:fe5d:a126/64"
    ],
    "changed": false,
    "failed": false
}

Прям с маской, чего нельзя в ansible_ipv6_addresses.

https://galaxy.ansible.com/amarao/ip

Profile

amarao: (Default)
amarao

August 2025

S M T W T F S
     12
345 6789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 21st, 2025 07:46 am
Powered by Dreamwidth Studios