Files
ansible_samba_tasks/tasks/setupacdc.yml
Jose 9811752871 style 💎: Update setupacdc.yml to disable certificate validation
Disabling certificate validation for Ansible setup process. This change ensures the connection is established without any certificate-related issues.
2025-11-01 10:48:14 +01:00

48 lines
1.3 KiB
YAML

- hosts: localhost
gather_facts: yes
vars:
addc_hostname: "DC1"
mac_address: "8E:90:31:DE:31:36"
node_ip: "{{ hostvars['node0']['ansible_host'] }}"
tasks:
- name: Install 'proxmoxer' and 'requests' Python libraries for the ansible controller
ansible.builtin.pip:
name:
- proxmoxer
- requests
state: present
become: no
- name: Print node IP
debug:
msg: "The IP address of node0 is {{ node_ip }}"
- name: Create lxc container
community.proxmox.proxmox:
vmid: 200
node: "{{ node_ip }}"
api_user: root@pam
api_password: "{{ proxmox_password }}"
api_host: "{{ node_ip }}"
password: 123456
hostname: "{{ addc_hostname }}"
ostype: debian
ostemplate: 'local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst'
description: samba ad dc
cores: 2
memory: 2048
disk: 'local-lvm:10'
timezone: "Europe/Rome"
onboot: true
unprivileged: true
features:
- nesting=1
- keyctl=1
- mount=cifs
pubkey: 'ssh-ed25519 AAAAC3NzaC1...hBWA ansibleuser@ansiblehost'
netif:
net0: "name=eth0,hwaddr={{ mac_address }},gw={{ location_gateway }},ip={{ addc_ansible_host }}/24,bridge=vmbr0"
validate_certs: no