Sobes.tech
Junior

What tools do you use to run playbooks or roles?

sobes.tech AI

Answer from AI

  • Ansible CLI (manual command line execution).
  • Ansible Tower/AWX (web interface, scheduling, access management, integrations).
  • Jenkins/GitLab CI/GitHub Actions (CI/CD pipelines for automation and integration).
  • Custom scripts (Bash, Python) invoking ansible-playbook.
  • Molecule (for testing Ansible roles and playbooks).

Example of running via CLI:

# Run playbook on the production host group
ansible-playbook -i inventory/production site.yml --limit production

Example of running via Jenkinsfile:

pipeline {
    agent any
    stages {
        stage('Run Playbook') {
            steps {
                sh 'ansible-playbook -i inventory/staging deploy.yml'
            }
        }
    }
}