Skip to content

john-westcott-iv/ansible-tower-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins Ansible Tower Plugin

This plugin gives you the ability to run Ansible Tower jobs as a build step.

Jenkins Wiki page: TBD

Configuration

On the Jenkins => Manage Jenkins => Configure System you will find an Ansible Tower section where you can add a connection to an Ansible Tower server.

Pipeline support

Tower jobs can be executed from workflow scripts. The towerServer and jobTemplate are the only required parameters. G

steps {
        ansibleTower(
            towerServer: 'Prod Tower',
            jobTemplate: 'Simple Test',
            importTowerLogs: true,
            inventory: 'Demo Inventory',
            jobTags: '',
            limit: '',
            removeColor: false,
            verbose: true,
            credential: '',
            extraVars: '''---
my_var: "Jenkins Test"'''
        )
}

Colorized Console Log

You need to install the AnsiColor plugin to output a colorized Ansible log.

node {
    wrap([$class: 'AnsiColorBuildWrapper', colorMapName: "xterm"]) {
        ansibleTower(
            towerServer: 'Prod Tower',
            jobTemplate: 'Simple Test',
            importTowerLogs: true,
            inventory: 'Demo Inventory',
            jobTags: '',
            limit: '',
            removeColor: false,
            verbose: true,
            credential: '',
            extraVars: '''---
my_var: "Jenkins Test"'''
        )
    }
}

If you dont have AnsiColor or want to remove the color from the log set removeColor: true.

About

Jenkins ansible tower plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published