aboutsummaryrefslogtreecommitdiffstats
path: root/roles/proxmox_hypervisor/tasks/pve_api_user.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/proxmox_hypervisor/tasks/pve_api_user.yml')
-rw-r--r--roles/proxmox_hypervisor/tasks/pve_api_user.yml8
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/proxmox_hypervisor/tasks/pve_api_user.yml b/roles/proxmox_hypervisor/tasks/pve_api_user.yml
index f620a90..2fd04f1 100644
--- a/roles/proxmox_hypervisor/tasks/pve_api_user.yml
+++ b/roles/proxmox_hypervisor/tasks/pve_api_user.yml
@@ -1,6 +1,6 @@
- name: create unix account
user:
- name: "{{ proxmox_api_user | replace('@pam', '') }}"
+ name: '{{ proxmox_api_user }}'
shell: /sbin/nologin
password: '{{ proxmox_api_password | password_hash("sha512", proxmox_password_salt | default("")) }}'
state: present
@@ -13,9 +13,9 @@
- name: create PVE account
block:
- name: create PVE user
- command: pveum user add {{ proxmox_api_user }}
+ command: pveum user add {{ proxmox_api_user }}@pam
- name: set user ACLs
- command: pveum acl modify / -user {{ proxmox_api_user }} -role PVEAdmin -propagate 1
+ command: pveum acl modify / -user {{ proxmox_api_user }}@pam -role PVEAdmin -propagate 1
- when: proxmox_api_user not in pve_users.stdout_lines
+ when: proxmox_api_user~'@pam' not in pve_users.stdout_lines