Files
ansible_samba_tasks/tasks/setupacdc.yml

32 lines
968 B
YAML
Raw Normal View History

- 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 }} \