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

October 2025

S M T W T F S
   1234
5 67891011
12 131415161718
19202122232425
262728293031 

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 18th, 2025 10:54 am
Powered by Dreamwidth Studios