moved template ids to local groovy vars

This commit is contained in:
2026-02-02 14:01:22 -05:00
parent 2b6389f7dc
commit 26619f9c1a

10
Jenkinsfile vendored
View File

@@ -42,8 +42,6 @@ pipeline {
environment {
ANSIBLE_HOST_KEY_CHECKING = 'False'
ANSIBLE_FORCE_COLOR = 'true'
VM_TEMPLATE_ID = '133'
LXC_TEMPLATE_ID = '109'
}
stages {
@@ -80,6 +78,10 @@ pipeline {
def apiTokenId = tokenIdAndSecret[0]
def apiTokenSecret = tokenIdAndSecret[1]
// Template IDs
def vmTemplateId = '133'
def lxcTemplateId = '109'
sh """
ansible-playbook playbooks/provision.yml \
-e "proxmox_api_user=${apiUser}" \
@@ -90,8 +92,8 @@ pipeline {
-e "vm_hostname=${params.HOSTNAME}" \
-e "cpu_cores=${params.CPU_CORES}" \
-e "ram_gb=${params.RAM_GB}" \
-e "vm_template_id=${env.VM_TEMPLATE_ID}" \
-e "lxc_template_id=${env.LXC_TEMPLATE_ID}"
-e "vm_template_id=${vmTemplateId}" \
-e "lxc_template_id=${lxcTemplateId}"
"""
}
}