style 💎: Update LXC container setup command
Updated the pct create command to include ssh-public-keys and features, ensuring consistency with other setup commands.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user