Files
rproxy/Jenkinsfile
2024-06-30 16:39:34 +03:00

24 lines
881 B
Groovy

pipeline {
agent any
parameters {
string(name: "target_host", defaultValue: "", trim: true, description: "Target host")
string(name: "username", defaultValue: "", trim: true, description: "Ansible user")
password(name: "password", defaultValue: "", description: "Ansible password")
}
stages {
stage('Download') {
steps {
git branch: 'master', url:'${git_url}/Ansible/rproxy.git', credentialsId: 'git'
}
}
stage('Run') {
steps {
script {
wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: params.password]]]) {
sh 'ansible-playbook rproxy.yml -i ${target_host}, -u ${username} -e "ansible_password=${password}"'
}
}
}
}
}
}