prox things

This commit is contained in:
Roxedus 2022-10-18 22:15:55 +02:00
parent 271204d4e9
commit 7bce060f94
Signed by: Roxedus
GPG Key ID: 9B4E311961C63639

View File

@ -1,17 +1,17 @@
- name: Get users
become: "{{ do_become }}"
command:
argv:
- pvesh
- get
- /access/users
- --output-format=json
register: pve_users
# - name: Get users
# become: "{{ do_become }}"
# command:
# argv:
# - pvesh
# - get
# - /access/users
# - --output-format=json
# register: pve_users
- name: Create users
when: item.username not in (pve_users.stdout | from_json | community.general.json_query('[*].userid') |replace("@pam", ""))
include_tasks: create_user.yml
loop: "{{ users | selectattr('system', 'contains', 'proxmox') | flatten(levels=1) }}"
# - name: Create users
# when: item.username not in (pve_users.stdout | from_json | community.general.json_query('[*].userid') |replace("@pam", ""))
# include_tasks: create_user.yml
# loop: "{{ users | selectattr('system', 'contains', 'proxmox') | flatten(levels=1) }}"
- name: Disable SWAP sysctl on host
become: true