Has anyone successfully used this module? I have tried to follow the directions here and appear to be stuck on something stupid: https://docs.ansible.com/ansible/latest/collections/community/general/proxmox_module.html
I have installed the module via ansible-galaxy. As far as I can tell the usual Ansible "hosts" inventory is just not used for this module, but if it is I cannot see how from these directions. Here is an example from my .yml:
(fake pass, obviously)
Then I have more -name entries with more containers to create. This fails over and over. I tried creating a basic hosts.yml as a dummy, but that didn't help.
I am *guessing* you use "localhost" for the Ansible "host" because the details for each created container contain the API host you are connecting to and executing commands on. If that isn't how it works it is super unclear from the documentation. Can anyone explain this to me?
TIA.
I have installed the module via ansible-galaxy. As far as I can tell the usual Ansible "hosts" inventory is just not used for this module, but if it is I cannot see how from these directions. Here is an example from my .yml:
YAML:
# Deploys Arvados container hosts
- hosts: localhost
tasks:
- name: Create API container
community.general.proxmox:
vmid: 500
node: ibnmajid
api_user: root@pam
api_password: setecastronomy
api_host: ibnmajid
password: setecastronomy
hostname: arvados-api
ostemplate: 'largewrxFS:vztmpl/ubuntu-20.04-standard_20.04-1_amd64.tar.gz'
cores: 1
memory: 2048
disk: 40
storage: fastwrx
mounts: '{"mp0":"largewrxFS:/arvadosdata/,mp=/mnt/arvadosdata/"}'
netif: '{"net0":"name=eth0,gw=192.168.9.1,ip=192.168.9.80/24,bridge=vmbr0"}'
unprivileged: no
validate_certs: no
onboot: yes
description: container for Arvados API server
(fake pass, obviously)
Then I have more -name entries with more containers to create. This fails over and over. I tried creating a basic hosts.yml as a dummy, but that didn't help.
Code:
jtd@Picon:~/arvados-cluster$ ansible-playbook arvados-deploy-hosts.yml -i hosts.yml
PLAY [localhost] *****************************************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]
TASK [Create API container] ******************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: deprecate() got an unexpected keyword argument 'collection_name'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/jtd/.ansible/tmp/ansible-tmp-1613891679.837745-47033749956554/AnsiballZ_proxmox.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/jtd/.ansible/tmp/ansible-tmp-1613891679.837745-47033749956554/AnsiballZ_proxmox.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/jtd/.ansible/tmp/ansible-tmp-1613891679.837745-47033749956554/AnsiballZ_proxmox.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.proxmox', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_community.general.proxmox_payload_y_kcagyv/ansible_community.general.proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py\", line 706, in <module>\n File \"/tmp/ansible_community.general.proxmox_payload_y_kcagyv/ansible_community.general.proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py\", line 546, in main\nTypeError: deprecate() got an unexpected keyword argument 'collection_name'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP ***********************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
I am *guessing* you use "localhost" for the Ansible "host" because the details for each created container contain the API host you are connecting to and executing commands on. If that isn't how it works it is super unclear from the documentation. Can anyone explain this to me?
TIA.