pipeline { agent any stages { stage('Checkout') { steps { checkout scm } } stage('Deploy') { when { branch 'master' } steps { sh 'ansible-galaxy install -r requirements.yml' ansiblePlaybook become: true, credentialsId: 'jenkins_freeipa_ssh', disableHostKeyChecking: true, installation: 'Default', inventory: 'inventory.yml', playbook: 'run.yml', vaultCredentialsId: 'ansible_vault' } } } post { always { recordIssues enabledForFailure: true, tools: [ansibleLint(pattern: '**/run.yml')] } } }