audit dynamic inventory options in jenkinsfiles
This commit is contained in:
@ -45,14 +45,19 @@ pipeline {
|
||||
//Run the cosmos-base ansible playbook
|
||||
// /workspace/ansible/playbooks/cosmos-base.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/lldp-scan.yaml --ssh-common-args='-o StrictHostKeyChecking=no' \
|
||||
ansible-playbook -i \$inventory_file /var/jenkins_home/ansible/playbooks/lldp-scan.yaml \
|
||||
--ssh-common-args='-o StrictHostKeyChecking=no' \
|
||||
--extra-vars "new_hostname=MC-LLDP fixed_size='--window-size=${params.chrome_resolution}' \
|
||||
run_test=${params.run_test} rename_host=true refresh_only=${params.refresh_only} \
|
||||
public_deploy=true no_vpn=true matt_public_key='${env.matt_public_key}' \
|
||||
cosmos_password='${env.cosmos_password}' cosmos_root_password='${env.cosmos_root_password}' "
|
||||
run_test=${params.run_test} rename_host=true refresh_only=${params.refresh_only} \
|
||||
public_deploy=true no_vpn=true matt_public_key='${env.matt_public_key}' \
|
||||
cosmos_password='${env.cosmos_password}' cosmos_root_password='${env.cosmos_root_password}' "
|
||||
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user