Some checks failed
multibranch_ansible/pipeline/head There was a failure building this commit
39 lines
834 B
Groovy
39 lines
834 B
Groovy
pipeline {
|
|
agent none
|
|
|
|
stages {
|
|
|
|
stage ('Hello') {
|
|
agent any
|
|
steps {
|
|
echo 'Hello, '
|
|
|
|
sh '''#!/bin/bash
|
|
|
|
echo "Hello from bash"
|
|
echo "Who I'm $SHELL"
|
|
'''
|
|
}
|
|
|
|
}
|
|
stage('Ansible local run') {
|
|
agent any
|
|
steps {
|
|
ansiblePlaybook playbook: 'local_test.yml'
|
|
// ansiblePlaybook credentialsId: '209d0fa2-bbd7-4af5-9aac-deec1b6aa7ec', inventory: '192.168.150.40,', playbook: 'test_play.yml'
|
|
}
|
|
}
|
|
stage('Ansible Remote') {
|
|
agent any
|
|
// {
|
|
// label 'master'
|
|
// }
|
|
steps {
|
|
ansiblePlaybook credentialsId: '209d0fa2-bbd7-4af5-9aac-deec1b6aa7ec', inventory: '192.168.50.40,', playbook: 'test_play.yml'
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|