test jenkinsfile update for windows 4
This commit is contained in:
@ -115,17 +115,16 @@ all:
|
|||||||
IFS=',' read -ra IPS <<< "$IP_LIST"
|
IFS=',' read -ra IPS <<< "$IP_LIST"
|
||||||
for IP in "${IPS[@]}"; do
|
for IP in "${IPS[@]}"; do
|
||||||
inventory_content+=" ${IP}:
|
inventory_content+=" ${IP}:
|
||||||
ansible_user: ${WINDOWS_USER}
|
|
||||||
ansible_password: '${ANSIBLE_PASSWORD}'
|
|
||||||
ansible_host: ${IP}
|
ansible_host: ${IP}
|
||||||
ansible_connection: winrm
|
|
||||||
ansible_winrm_server_cert_validation: ignore
|
|
||||||
"
|
"
|
||||||
done
|
done
|
||||||
|
|
||||||
inventory_content+=" vars:
|
inventory_content+=" vars:
|
||||||
ansible_connection: ssh
|
ansible_user: ${WINDOWS_USER}
|
||||||
ansible_ssh_private_key_file: /var/jenkins_home/jenkins_key
|
ansible_password: '${ANSIBLE_PASSWORD}'
|
||||||
|
ansible_connection: winrm
|
||||||
|
ansible_winrm_server_cert_validation: ignore
|
||||||
|
winrm_transport = ntlm
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
jenkins_user: '${JENKINS_USER}'
|
jenkins_user: '${JENKINS_USER}'
|
||||||
jenkins_group: '${JENKINS_GROUP}'
|
jenkins_group: '${JENKINS_GROUP}'
|
||||||
|
|||||||
@ -53,7 +53,7 @@ pipeline {
|
|||||||
cd /var/jenkins_home/ansible-windows
|
cd /var/jenkins_home/ansible-windows
|
||||||
|
|
||||||
echo ansible-playbook -i \$inventory_file \$playbook_file \
|
echo ansible-playbook -i \$inventory_file \$playbook_file \
|
||||||
--ssh-common-args='-o StrictHostKeyChecking=no' "
|
--ssh-common-args='-o StrictHostKeyChecking=no'
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user