Closed alexanderjacuna closed 1 year ago
Adding the inventory/my-cluster/group_vars/proxmox.yml file.
---
ansible_user: '{{ proxmox_lxc_ssh_user }}'
Updated to latest ansible version.
srvadmin@k3s28wk:~/k3s-ansible$ ansible --version
ansible [core 2.12.10]
config file = /home/srvadmin/k3s-ansible/ansible.cfg
configured module search path = ['/home/srvadmin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/srvadmin/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
Archive this issue. I think I need to double check my work. I expect that I'll need to open another issue but let me confirm a couple more things. Will open another issue if needed.
Expected Behavior
When executing the command: ansible-playbook site.yml -i inventory/my-cluster/hosts.ini I was expecting the playbook to complete as seen in the video tutorials. Instead it is getting hung up during the app armor task.
Current Behavior
Steps to Reproduce
PLAY [proxmox] ***
TASK [Gathering Facts] *** ok: [10.13.38.12] ok: [10.13.38.13] ok: [10.13.38.11]
TASK [proxmox_lxc : check for container files that exist on this host] *** ok: [10.13.38.12] => (item=3831) ok: [10.13.38.13] => (item=3831) ok: [10.13.38.11] => (item=3831) ok: [10.13.38.12] => (item=3832) ok: [10.13.38.13] => (item=3832) ok: [10.13.38.11] => (item=3832) ok: [10.13.38.12] => (item=3833) ok: [10.13.38.13] => (item=3833) ok: [10.13.38.12] => (item=3834) ok: [10.13.38.11] => (item=3833) ok: [10.13.38.13] => (item=3834) ok: [10.13.38.12] => (item=3835) ok: [10.13.38.13] => (item=3835) ok: [10.13.38.11] => (item=3834) ok: [10.13.38.12] => (item=3836) ok: [10.13.38.13] => (item=3836) ok: [10.13.38.11] => (item=3835) ok: [10.13.38.11] => (item=3836)
TASK [proxmox_lxc : filter out files that do not exist] ** ok: [10.13.38.11] ok: [10.13.38.12] ok: [10.13.38.13]
TASK [proxmox_lxc : get container ids from filtered files] *** ok: [10.13.38.11] ok: [10.13.38.12] ok: [10.13.38.13]
TASK [proxmox_lxc : Ensure lxc config has the right apparmor profile] **** fatal: [10.13.38.11]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <generator object do_map at 0x7fa72e505660>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."} fatal: [10.13.38.12]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <generator object do_map at 0x7fa72e502430>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."} fatal: [10.13.38.13]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <generator object do_map at 0x7fa72e517430>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."}
PLAY RECAP *** 10.13.38.11 : ok=4 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
10.13.38.12 : ok=4 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
10.13.38.13 : ok=4 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Context (variables)
Operating system(es):
root@pveXX:~# pveversion pve-manager/7.4-3/9002ab8a (running kernel: 5.15.102-1-pve)
srvadmin@k3sXX:~/k3s-ansible$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal
Hardware: 3 x amd64 servers for Proxmox VE nodes with combined 88 cpus and 160 memory 6 x amd64 LXC servers with 2 cores, 4GB memory
Variables Used
inventory/my-cluster/group_vars/all.yml
'srvadmin@k3s28wk:~/k3s-ansible$ cat ansible.cfg' ''' [defaults] inventory = inventory/my-cluster/hosts.ini private_key_file = /home/srvadmin/.ssh/id_ed25519_ansible '''
Hosts
inventory/my-cluster/hosts.ini
Possible Solution