Skip to content

Commit 20c3be4

Browse files
committed
fix role variable inconsistencies and doc edits
1 parent 9f1a10d commit 20c3be4

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,7 @@ pve_users: [] # List of user definitions to manage in PVE. See section on User M
422422
pve_storages: [] # List of storages to manage in PVE. See section on Storage Management.
423423
pve_datacenter_cfg: {} # Dictionary to configure the PVE datacenter.cfg config file.
424424
pve_domains_cfg: [] # List of realms to use as authentication sources in the PVE domains.cfg config file.
425-
pve_no_log: false # Set this to true in production to disable logging for strorage add to avoid having credentials leaked in log.
426-
pve_addr0_priority: 255 # Type: integer Sets the Priority of the first Link for Corosync. Lower Number means higher Priority.
427-
pve_addr1_priority: 0 # Type: integer See [pvecm-network-priority] for more Information.
425+
pve_no_log: false # Set this to true in production to prevent leaking of storage credentials in run logs. (may be used in other tasks in the future)
428426
```
429427

430428
To enable clustering with this role, configure the following variables appropriately:
@@ -437,12 +435,17 @@ pve_manage_hosts_enabled : yes # Set this to no to NOT configure hosts file (cas
437435

438436
The following variables are used to provide networking information to corosync.
439437
These are known as ring0_addr/ring1_addr or link0_addr/link1_addr, depending on
440-
PVE version. They should be IPv4 or IPv6 addresses. For more information, refer
441-
to the [Cluster Manager][pvecm-network] chapter in the PVE Documentation.
438+
PVE version. They should be IPv4 or IPv6 addresses. You can also configure the
439+
[priority of these interfaces][pvecm-network-priority] to hint to corosync
440+
which interface should handle cluster traffic (lower numbers indicate higher
441+
priority). For more information, refer to the [Cluster Manager][pvecm-network]
442+
chapter in the PVE Documentation.
442443

443444
```
444445
# pve_cluster_addr0: "{{ defaults to the default interface ipv4 or ipv6 if detected }}"
445446
# pve_cluster_addr1: "another interface's IP address or hostname"
447+
# pve_cluster_addr0_priority: 255
448+
# pve_cluster_addr1_priority: 0
446449
```
447450

448451
You can set options in the datacenter.cfg configuration file:
@@ -595,9 +598,9 @@ Refer to `library/proxmox_role.py` [link][user-module] and
595598

596599
## Storage Management
597600

598-
You can use this role to manage storage within Proxmox VE (both in
599-
single server deployments and cluster deployments). For now, the only supported
600-
types are `dir`, `rbd`, `nfs`, `cephfs`, `lvm`,`lvmthin`, `zfspool`, `btrfs`, `cifs`
601+
You can use this role to manage storage within Proxmox VE (both in single
602+
server deployments and cluster deployments). For now, the only supported types
603+
are `dir`, `rbd`, `nfs`, `cephfs`, `lvm`,`lvmthin`, `zfspool`, `btrfs`, `cifs`
601604
and `pbs`. Here are some examples.
602605

603606
```

defaults/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ pve_cluster_clustername: "{{ pve_group }}"
4444
pve_manage_hosts_enabled: yes
4545
pve_cluster_addr0: "{{ ansible_default_ipv4.address if ansible_default_ipv4.address is defined else ansible_default_ipv6.address if ansible_default_ipv6.address is defined }}"
4646
# pve_cluster_addr1: "{{ ansible_eth1.ipv4.address }}
47+
# pve_cluster_addr0_priority: 0
48+
# pve_cluster_addr1_priority: 1
4749
pve_datacenter_cfg: {}
4850
pve_domains_cfg: []
4951
pve_cluster_ha_groups: []
@@ -57,4 +59,4 @@ pve_storages: []
5759
pve_ssh_port: 22
5860
pve_manage_ssh: true
5961
pve_hooks: {}
60-
pve_no_logging: false
62+
pve_no_log: false

library/proxmox_storage.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,13 @@
113113
- Specifies the CIFS-Share to use
114114
subdir:
115115
required: false
116-
- specifies the folder in the share dir to use for proxmox
116+
- specifies the folder in the share dir to use for proxmox
117117
(useful to seperate proxmox content from other content)
118118
domain:
119119
required: false
120-
- Specifies Realm to use for NTLM/LDAPS Authentification if using
120+
- Specifies Realm to use for NTLM/LDAPS Authentification if using
121121
an AD-Enabled share
122+
122123
author:
123124
- Fabien Brachere (@fbrachere)
124125
'''
@@ -247,10 +248,10 @@ def __init__(self, module):
247248
self.thinpool = module.params['thinpool']
248249
self.sparse = module.params['sparse']
249250
self.is_mountpoint = module.params['is_mountpoint']
250-
251+
251252
# namespace for pbs
252253
self.namespace = module.params['namespace']
253-
# new params for cifs
254+
# CIFS properties
254255
self.domain = module.params['domain']
255256
self.subdir = module.params['subdir']
256257
self.share = module.params['share']
@@ -449,7 +450,7 @@ def main():
449450
vgname=dict(default=None, type='str', required=False),
450451
thinpool=dict(default=None, type='str', required=False),
451452
sparse=dict(default=None, type='bool', required=False),
452-
is_mountpoint=dict(default=None, type='bool', required=False),
453+
is_mountpoint=dict(default=None, type='bool', required=False),
453454
namespace=dict(default=None, type='str', required=False),
454455
subdir=dict(default=None, type='str', required=False),
455456
domain=dict(default=None, type='str', required=False),

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
domain: "{{ item.domain | default(omit) }}"
338338
subdir: "{{ item.subdir | default(omit) }}"
339339
share: "{{ item.share | default(omit) }}"
340-
no_log: "{{ pve_no_logging }}"
340+
no_log: "{{ pve_no_log }}"
341341
with_items: "{{ pve_storages }}"
342342
when: "not pve_cluster_enabled | bool or (pve_cluster_enabled | bool and inventory_hostname == _init_node)"
343343
tags: storage

0 commit comments

Comments
 (0)