Add dynamic LXC groups

- Distribution
- Packet manager (from first line and word of python install command)
This commit is contained in:
Sven Velt 2023-03-20 21:53:48 +01:00
parent 23ee0fe7f3
commit 43f844014b

View file

@ -90,6 +90,9 @@
template: download
template_options: "-a amd64 -d {{ os_d }} -r {{ os_r }} {% if 'no-validate' in lxc_download_validate.stdout %}--no-validate{% endif %}"
config: "{{ lxc_config_file|default('/etc/lxc/ansible.conf') }}"
container_config:
- "lxc.group = {{ os_d }}"
- "lxc.group = {{ (cmdline_python[os_d][0]).split(' ')[0].split('-')[0] }}"
register: lxc_created
delegate_to: "{{ ansible_host|default('localhost') }}"