diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index 1ef1780..d51e628 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -50,22 +50,23 @@ - name: Create LXC container {{ container_hostname }} with id {{ container_id }} using pct command on shell ansible.builtin.shell: | + set -e pct create {{ container_id }} {{ container_template }} \ -ostype {{ container_ostype }} \ -hostname {{ container_hostname }} \ -password "{{ container_password }}" \ - -ssh-public-keys {{ ssh_keys_file }} \ + -ssh-public-keys "{{ ssh_keys_file }}" \ -cores {{ container_cores }} \ -memory {{ container_memory }} \ -swap {{ container_swap }} \ - -net0 {{container_net}} \ + -net0 "{{container_net}}" \ -storage {{ container_storage }} \ -description "{{ container_description }}" \ -onboot {{ container_onboot }} \ -protection {{ container_protection }} \ -unprivileged {{ container_unprivileged }} \ -tags "{{ container_tags | join(',') }}" \ - -features {{ container_features }} + -features "{{ container_features }}" args: creates: "/etc/pve/lxc/{{ container_id }}.conf" no_log: false