Files
ansible_samba_tasks/tasks/setupacdc.yml
Jose 0c8ccd5dff style 💎: Update protection setting in setupacdc.yml
Updated the protection setting from 1 to 0 in the setupacdc.yml file, allowing for more flexibility in the LXC configuration. This change does not affect the functionality of the setup process.
2025-11-01 23:55:30 +01:00

32 lines
968 B
YAML

- hosts: node0
gather_facts: no
vars:
addc_hostname: "DC1"
mac_address: "8E:90:31:DE:31:36"
node_ip: "{{ hostvars['node0']['ansible_host'] }}"
tasks:
- name: Create LXC container using pct command
shell: |
pct create 200 '/var/lib/vz/template/cache/debian-13-standard_13.1-1_amd64.tar.zst' \
-ostype debian \
-hostname {{ addc_hostname }} \
-password 123456 \
-cores 2 \
-memory 1024 \
-swap 128 \
-net0 name=eth0,bridge=vmbr0,ip={{ addc_ansible_host }}/24,gw={{ location_gateway }},hwaddr={{ mac_address }} \
-storage local-lvm \
-description "default lxc" \
-onboot 1 \
-protection 0 \
-unprivileged 1 \
-tags "ansible_managed,test" \
-features keyctl=1,nesting=1,mount=cifs
become: yes
become_user: root
# -timezone: {{ localization_timezone }} \