much tidying up

This commit is contained in:
2026-03-29 21:46:33 -07:00
parent a201c7919a
commit e95dd3efd5
30 changed files with 944 additions and 186 deletions

View File

@ -0,0 +1,55 @@
pipeline {
agent any
environment {
ANSIBLE_FORCE_COLOR = '1'
SATURN_BEHEMOTH = credentials('SATURN_BEHEMOTH')
LINUX_LDAP_PWD = credentials('LINUX_LDAP')
AUTHORIZED_KEY = credentials('AUTH_SSH_KEY')
matt_public_key = credentials('matt_public_key')
matt_private_key = credentials('matt_private_key')
cosmos_password = credentials('cosmos_password')
cosmos_root_password = credentials('cosmos_root_password')
EMAIL_RECIPIENTS = "matt@theregion.beer"
}
options {
ansiColor('xterm')
}
stages {
stage('Ansible Playbook') {
steps {
//Run the pxe-server ansible playbook
// /workspace/ansible/playbooks/pxe-server.yaml
sh """
set +x
inventory_file="/var/jenkins_home/ansible/inventory/automation/pxe.yaml"
playbook_file="/var/jenkins_home/ansible/playbooks/pxe-server.yaml"
extra_vars=\$(echo " \
new_hostname=debian-pxe.home.cosmos \
saturn_behemoth=${SATURN_BEHEMOTH} \
authorized_key=${AUTHORIZED_KEY} \
rename_host=true \
matt_public_key='${env.matt_public_key}' \
cosmos_password='${env.cosmos_password}' \
cosmos_root_password='${env.cosmos_root_password}' \
quick_refresh='false' \
refresh_special='false' \
" | tr -s " ")
set -x
cd /var/jenkins_home/ansible
ansible-playbook -i \$inventory_file \$playbook_file \
--ssh-common-args='-o StrictHostKeyChecking=no' \
--extra-vars "\$extra_vars matt_private_key='${env.matt_private_key}'
"""
}
}
}
}