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

February 2026

S M T W T F S
123456 7
8910111213 14
15161718192021
22232425262728

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 25th, 2026 09:14 am
Powered by Dreamwidth Studios