diff --git a/inventories/testing b/inventories/testing index 9bc0261..6c7fe40 100644 --- a/inventories/testing +++ b/inventories/testing @@ -1,2 +1,5 @@ [puppet-masters] -puppet-master-testing ansible_host=192.168.100.200 +puppet-master cores=2 ram=4096 ansible_host=10.17.0.200 + +test0 cores=2 ram=2048 ansible_host=10.17.0.201 +ns0 cores=2 ram=2048 ansuble_host=10.17.0.53 diff --git a/playbooks/proxmox_vm.yml b/playbooks/proxmox_vm.yml new file mode 100644 index 0000000..a7e066a --- /dev/null +++ b/playbooks/proxmox_vm.yml @@ -0,0 +1,29 @@ +--- +- hosts: all + gather_facts: no + connection: local + tasks: + - name: Clone VM + proxmox_kvm: + api_host: orsay.internal.softwareheritage.org + api_user: ftigeot@pam + name: "{{ inventory_hostname.split('.')[0] }}" + agent: yes + storage: flash + format: raw + state: present + node: orsay + timeout: 600 + delegate_to: localhost + - name: Update VMs + proxmox_kvm: + api_host: orsay.internal.softwareheritage.org + api_user: ftigeot@pam + node: orsay + update: yes + name: "{{ inventory_hostname.split('.')[0] }}" + cores: "{{ cores }}" + memory: "{{ ram }}" + state: started + delegate_to: localhost + register: cloned_vm