The ansible module which appears to be meant to manage lxc containers is inoperable, and refers to the archived lxc/python2-lxc library.
lxc_container is in the latest ansible-galaxy community.general documentation, but is missing - probably because it cannot be built. Which is pretty disappointing.
The vagrant infrastructure for the lxc provider is a bit creaky too. Seems to work, but there are no official Ubuntu 20.04 LTS boxes.
Is it me, or the ecosystem, that is missing something?
I thought that Ansible transitioned to python3 by now, in which case it should be using python3-lxc that in general is in a much better state than python2-lxc.
Could you please tell me, did you solve a problem with module community.general.lxc_container. I also have a problem with this. My playbook does not work.
—
- hosts: devel-lxd01
become: true
tasks:
- name: Create a started container
community.general.lxc_container:
name: test-container-started
container_log: true
template: ubuntu
state: started
template_options: --release trusty
I am getting error:
TASK [Create a started container] *************************************************************************************************************
fatal: [devel-lxd01]: FAILED! => {“changed”: false, “msg”: “Failed to find required executable “lxc-create” in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin”}