Dear All,
I'm new in proxmox 7.4-3. I deploy automation in ansible. Everything is fine, ct is creating, but when i add "mounts:" :
mounts: '{"mp0":"local:8,mp=/mnt/test/"}'
i see the following error:
fatal: [192.168.122.63]: FAILED! => {"changed": false, "msg": "Creation of lxc VM 205 failed with exception: 500 Internal Server Error: mount points configured, but 'rootfs' not set - aborting"}
I see on our forum that on proxmox terminal is common uses:
--rootfs local-lvm:8 (f.e. pct create 100 local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz --rootfs local-lvm:8)
How can I implement it in my ansible auto script?
My playbook's look like:
YAML:
- name: Test connectivity to target servers
hosts: all
run_once: true
gather_facts: false
tasks:
- name: Create CT
community.general.proxmox:
api_host: devops
api_user: root@pam
api_password: 123zxc
api_token_id: yyy
api_token_secret: xxx
node: devops
hostname: testct
password: 123zxc
ostemplate: 'local:vztmpl/centos-7-default_20190926_amd64.tar.xz'
vmid: 205
description: created with ansible
cores: 2
timeout: 60
netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}'
mounts: '{"mp0":"local:8,mp=/mnt/test/"}'
features: nesting=1
memory: 1024
swap: 1024
nameserver: 192.168.122.1
searchdomain: devops.local
unprivileged: 1
onboot: true
I'm new in proxmox 7.4-3. I deploy automation in ansible. Everything is fine, ct is creating, but when i add "mounts:" :
mounts: '{"mp0":"local:8,mp=/mnt/test/"}'
i see the following error:
fatal: [192.168.122.63]: FAILED! => {"changed": false, "msg": "Creation of lxc VM 205 failed with exception: 500 Internal Server Error: mount points configured, but 'rootfs' not set - aborting"}
I see on our forum that on proxmox terminal is common uses:
--rootfs local-lvm:8 (f.e. pct create 100 local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz --rootfs local-lvm:8)
How can I implement it in my ansible auto script?
My playbook's look like:
YAML:
- name: Test connectivity to target servers
hosts: all
run_once: true
gather_facts: false
tasks:
- name: Create CT
community.general.proxmox:
api_host: devops
api_user: root@pam
api_password: 123zxc
api_token_id: yyy
api_token_secret: xxx
node: devops
hostname: testct
password: 123zxc
ostemplate: 'local:vztmpl/centos-7-default_20190926_amd64.tar.xz'
vmid: 205
description: created with ansible
cores: 2
timeout: 60
netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}'
mounts: '{"mp0":"local:8,mp=/mnt/test/"}'
features: nesting=1
memory: 1024
swap: 1024
nameserver: 192.168.122.1
searchdomain: devops.local
unprivileged: 1
onboot: true
Last edited: