Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Install python-pip
- become: true
- apt:
- name: python-pip
- state: installed
- - name: Install PIP packages for API use
- become: true
- pip:
- name: proxmoxer, requests
- state: present
- - name: Create vmdeploy group
- become: true
- group:
- name: vmdeploy
- state: present
- - name: Add PVE deploy user
- become: true
- user:
- name: pveautodeploy
- shell: /bin/bash
- groups: vmdeploy
- password: "<<HASHED PASSWORD>>"
- register: create_user
- - name: "Add Proxmox User account (1/4)"
- become: true
- command: "pveum useradd pveautodeploy@pam -comment 'API user for VM autodeploy'"
- ignore_errors: True
- when: create_user.changed
- - name: "Add Proxmox User account (2/4)"
- become: true
- command: "pveum groupadd vmdeploy -comment 'VM Auto Deploy'"
- ignore_errors: True
- when: create_user.changed
- - name: "Add Proxmox User account (3/4)"
- become: true
- command: "pveum aclmod / -group vmdeploy -role Administrator"
- ignore_errors: True
- when: create_user.changed
- - name: "Add Proxmox User account (4/4)"
- become: true
- command: "pveum usermod pveautodeploy@pam -group vmdeploy"
- ignore_errors: True
- when: create_user.changed
Add Comment
Please, Sign In to add comment