audit dynamic inventory options in jenkinsfiles
This commit is contained in:
@ -57,10 +57,16 @@ pipeline {
|
||||
//Run the pxe-server ansible playbook
|
||||
// /workspace/ansible/playbooks/pxe-server.yaml
|
||||
sh """
|
||||
|
||||
echo ${params.host_ip}
|
||||
hash=\$(echo -n ${params.host_ip} | md5sum | cut -c 1-8)
|
||||
inventory_file="/var/jenkins_home/ansible/.inv/inventory-\$hash.yml"
|
||||
|
||||
|
||||
cd /var/jenkins_home/ansible
|
||||
|
||||
ansible-playbook -i /var/jenkins_home/ansible/.inv/inventory-${params.host_ip}.yml \
|
||||
/var/jenkins_home/ansible/playbooks/pxe-server.yaml --ssh-common-args='-o StrictHostKeyChecking=no' \
|
||||
ansible-playbook -i \$inventory_file /var/jenkins_home/ansible/playbooks/pxe-server.yaml \
|
||||
--ssh-common-args='-o StrictHostKeyChecking=no' \
|
||||
--extra-vars "new_hostname=debian-pxe.home.cosmos saturn_behemoth=${SATURN_BEHEMOTH} authorized_key=${AUTHORIZED_KEY} \
|
||||
rename_host=true apps_list=${APPS_LIST} listen_interface=${params.iface} pxe_auth=${pxe_proxy_password} \
|
||||
internet_interface=${params.inet_iface} dhcp_subnet=${params.dhcp_subnet} \
|
||||
|
||||
Reference in New Issue
Block a user