refactor ♻️: Refactored the Proxmox setup task to include additional configuration options for the LXC container. Added a new parameter mac_address to specify the MAC address of the container.
Updated the Proxmox setup task to include additional configuration options for the LXC container, such as setting a custom MAC address.
This commit is contained in:
@@ -1,8 +1,31 @@
|
||||
- hosts: "node0"
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
|
||||
|
||||
- name: Create lxc container
|
||||
community.proxmox.proxmox:
|
||||
mac_address: "8E:90:31:DE:31:36"
|
||||
vmid: 200
|
||||
node: node0
|
||||
api_user: root@pam
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: node0
|
||||
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: "{{ localization_timezone }}"
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user