ansible roles default files

This commit is contained in:
2026-02-02 14:03:39 -05:00
parent 26619f9c1a
commit 7755e65756
4 changed files with 9 additions and 11 deletions

8
Jenkinsfile vendored
View File

@@ -78,10 +78,6 @@ pipeline {
def apiTokenId = tokenIdAndSecret[0] def apiTokenId = tokenIdAndSecret[0]
def apiTokenSecret = tokenIdAndSecret[1] def apiTokenSecret = tokenIdAndSecret[1]
// Template IDs
def vmTemplateId = '133'
def lxcTemplateId = '109'
sh """ sh """
ansible-playbook playbooks/provision.yml \ ansible-playbook playbooks/provision.yml \
-e "proxmox_api_user=${apiUser}" \ -e "proxmox_api_user=${apiUser}" \
@@ -91,9 +87,7 @@ pipeline {
-e "target_node=${params.TARGET_NODE}" \ -e "target_node=${params.TARGET_NODE}" \
-e "vm_hostname=${params.HOSTNAME}" \ -e "vm_hostname=${params.HOSTNAME}" \
-e "cpu_cores=${params.CPU_CORES}" \ -e "cpu_cores=${params.CPU_CORES}" \
-e "ram_gb=${params.RAM_GB}" \ -e "ram_gb=${params.RAM_GB}"
-e "vm_template_id=${vmTemplateId}" \
-e "lxc_template_id=${lxcTemplateId}"
""" """
} }
} }

View File

@@ -123,11 +123,11 @@ Modify available nodes in the `Jenkinsfile` parameters section.
### Templates ### Templates
Template VMIDs are configured in the Jenkinsfile environment section: Template VMIDs are configured in the role defaults:
- `VM_TEMPLATE_ID` - VMID of the VM template (currently: 133) - [roles/proxmox_vm/defaults/main.yml](roles/proxmox_vm/defaults/main.yml) - VM template (VMID: 133)
- `LXC_TEMPLATE_ID` - VMID of the LXC template (currently: 109) - [roles/proxmox_lxc/defaults/main.yml](roles/proxmox_lxc/defaults/main.yml) - LXC template (VMID: 109)
Update the values in the `environment` block of the Jenkinsfile to use different templates. Update the values in these files to use different templates.
## License ## License

View File

@@ -0,0 +1,2 @@
---
lxc_template_id: "109"

View File

@@ -0,0 +1,2 @@
---
vm_template_id: "133"