Is tower/awx capable of importing job templates from source control? Either through github or maybe a push through Jenkins. So far the only things I can get to pull from source our inventories and playbooks. I’m unable to find any doc’s that talk about what all an be sourced for tower/awx. Any thoughts or suggestions is greatly appreciated.
Sort of . Towercli and presumably the replacement cli announced with awx 7. Can load and maintain templates. If you combine that with your git /git ci that's somewhere to start. It's not automatic and built in like the playbook fetch however out of the box
You can alternatively use tower_job_template module as part of a playbook to configure job templates.
Yes tower/AWX is cabaple of importing jobs from source control. AWX can import jobs from : subversion, mercurial, git, SVN etc
Importing jobs from subversion (Git):
Execution Steps :
- Login to AWX dashboard with any user.
- Create inventory and add host.
- Create credential.
- Now click on projects and create a project ‘Project_name’ with SCM type as ‘Subversion’.
- Write playbook in ‘git’ repository
- Provde SCM url of your repository where playbook is available.
- Create a job template and select created project in the project parameter. It will automatically show the list of all playbooks available at provided url.
While importing jobs from mercurial follow below steps:
- Crate a credential and provide username and password of mercurial account.
- Select credential type as ‘source control’
- Create project and select project type as mercurial.
- Provide SCM url of repository where your playbook exists.
- Select SCM credential which is created in step 1.
- Create a job and select created project, it will show all the playbooks available at your repository.
you can add job templates through api, for example with ansible: https://github.com/redhat-cop/infra-ansible/tree/master/roles/ansible/tower
Thank you, very helpful.
Thank you.