added Jenkinsfile
Some checks failed
multibranch_ansible/pipeline/head There was a failure building this commit
Some checks failed
multibranch_ansible/pipeline/head There was a failure building this commit
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -16,13 +16,20 @@ pipeline {
|
||||
}
|
||||
|
||||
}
|
||||
stage('Ansible') {
|
||||
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
|
||||
steps {
|
||||
ansiblePlaybook credentialsId: '209d0fa2-bbd7-4af5-9aac-deec1b6aa7ec', inventory: '192.168.50.40,', playbook: 'test_play.yml'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
- name: "TestPlay"
|
||||
gather_facts: true
|
||||
become: false
|
||||
#hosts: 192.168.150.40
|
||||
hosts: localhost
|
||||
connection: local
|
||||
hosts: 192.168.50.40
|
||||
#hosts: localhost
|
||||
#connection: local
|
||||
tasks:
|
||||
- debug:
|
||||
msg: "Hello World"
|
||||
|
||||
Reference in New Issue
Block a user