|
36 | 36 | - The IP address of the cluster master when joining the cluster.
|
37 | 37 | type: str
|
38 | 38 | required: false
|
| 39 | + master_api_password: |
| 40 | + description: |
| 41 | + - Specify the password to authenticate with the master node. |
| 42 | + - Uses the api_password parameter if not specified. |
| 43 | + type: str |
| 44 | + required: false |
39 | 45 | fingerprint:
|
40 | 46 | description:
|
41 | 47 | - The fingerprint of the cluster master when joining the cluster.
|
|
78 | 84 | master_ip: "{{ primary_node }}"
|
79 | 85 | fingerprint: "{{ cluster_fingerprint }}"
|
80 | 86 | cluster_name: "devcluster"
|
| 87 | +
|
| 88 | +- name: Join a Proxmox VE Cluster with different API password |
| 89 | + community.proxmox.proxmox_cluster: |
| 90 | + api_host: proxmoxhost |
| 91 | + api_user: root@pam |
| 92 | + api_password: "{{ joining_node_api_password }}" |
| 93 | + master_api_password: "{{ master_node_api_password }}" |
| 94 | + master_ip: "{{ primary_node }}" |
| 95 | + fingerprint: "{{ cluster_fingerprint }}" |
| 96 | + cluster_name: "devcluster" |
81 | 97 | """
|
82 | 98 |
|
83 | 99 | RETURN = r"""
|
@@ -127,7 +143,7 @@ def cluster_create(self):
|
127 | 143 | def cluster_join(self):
|
128 | 144 | master_ip = self.module.params.get("master_ip")
|
129 | 145 | fingerprint = self.module.params.get("fingerprint")
|
130 |
| - api_password = self.module.params.get("api_password") |
| 146 | + api_password = self.module.params.get("master_api_password") or self.module.params.get("api_password") |
131 | 147 | cluster_name = self.module.params.get("cluster_name")
|
132 | 148 | is_in_cluster = True
|
133 | 149 |
|
@@ -180,6 +196,7 @@ def main():
|
180 | 196 | link0=dict(type='str'),
|
181 | 197 | link1=dict(type='str'),
|
182 | 198 | master_ip=dict(type='str'),
|
| 199 | + master_api_password=dict(type='str', no_log=True), |
183 | 200 | fingerprint=dict(type='str'),
|
184 | 201 | )
|
185 | 202 | module_args.update(cluster_args)
|
|
0 commit comments