Skip to content

Commit 970b7a2

Browse files
authored
Merge pull request #242 from btravouillon/fix/ipaddr
fix: Replace deprecated ansible.netcommon.ipaddr
2 parents 45ebf01 + eb63afe commit 970b7a2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS pack
395395
pve_zfs_create_volumes: [] # List of ZFS Volumes to create (to use as PVE Storages). See section on Storage Management.
396396
pve_ceph_enabled: false # Specifies wheter or not to install and configure Ceph packages. See below for an example configuration.
397397
pve_ceph_repository_line: "deb http://download.proxmox.com/debian/ceph-pacific bullseye main" # apt-repository configuration. Will be automatically set for 6.x and 7.x (Further information: https://pve.proxmox.com/wiki/Package_Repositories)
398-
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}" # Ceph public network
398+
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ansible.utils.ipaddr('net') }}" # Ceph public network
399399
# pve_ceph_cluster_network: "" # Optional, if the ceph cluster network is different from the public network (see https://pve.proxmox.com/pve-docs/chapter-pveceph.html#pve_ceph_install_wizard)
400400
pve_ceph_nodes: "{{ pve_group }}" # Host group containing all Ceph nodes
401401
pve_ceph_mon_group: "{{ pve_group }}" # Host group containing all Ceph monitor hosts
@@ -709,8 +709,9 @@ pve_ceph_fs:
709709
mountpoint: /srv/proxmox/backup
710710
```
711711

712-
`pve_ceph_network` by default uses the `ipaddr` filter, which requires the
713-
`netaddr` library to be installed and usable by your Ansible controller.
712+
`pve_ceph_network` by default uses the `ansible.utils.ipaddr` filter, which
713+
requires the `netaddr` library to be installed and usable by your Ansible
714+
controller.
714715

715716
`pve_ceph_nodes` by default uses `pve_group`, this parameter allows to specify
716717
on which nodes install Ceph (e.g. if you don't want to install Ceph on all your

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pve_zfs_enabled: no
1919
pve_zfs_create_volumes: []
2020
pve_ceph_enabled: false
2121
pve_ceph_repository_line: "deb http://download.proxmox.com/debian/{% if ansible_distribution_release == 'buster' %}ceph-nautilus buster{% else %}ceph-quincy bullseye{% endif %} main"
22-
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}"
22+
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ansible.utils.ipaddr('net') }}"
2323
pve_ceph_nodes: "{{ pve_group }}"
2424
pve_ceph_mon_group: "{{ pve_group }}"
2525
pve_ceph_mgr_group: "{{ pve_ceph_mon_group }}"

tasks/ceph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
path: '{{ item.mountpoint }}'
242242
src: |-
243243
{% for h in groups[pve_ceph_mon_group] -%}
244-
{{ hostvars[h].ansible_all_ipv4_addresses | ipaddr(pve_ceph_network) | first -}}
244+
{{ hostvars[h].ansible_all_ipv4_addresses | ansible.utils.ipaddr(pve_ceph_network) | first -}}
245245
{{ loop.last | ternary("", ",") -}}
246246
{% endfor %}:/
247247
fstype: 'ceph'

0 commit comments

Comments
 (0)