ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.86k stars 3.4k forks source link

Ability to store job templates in source control repo #526

Open jainnikhil30 opened 6 years ago

jainnikhil30 commented 6 years ago
ISSUE TYPE
SUMMARY

There should be a way for job templates to be source controlled repo aka git.

STEPS TO REPRODUCE

This feature can used if we have 2 ansible instances. Dev and prod. And then if we have a promotion model for all our playbooks from dev to prod. But then right now the job templates needs to be created manually.

perzizzle commented 6 years ago

We have the environment you describe with a dev and production instance of tower for security reasons. One of the biggest problems we have is keeping job templates in sync. We have a series of scripts that use the tower api to validate the job templates are identical but they aren't perfect. We already store our inventory, and playbooks in source control.

shawnmason01 commented 6 years ago

Has anyone gotten this working successfully? I am needing to find a way to store my job templates in a git repo.

wenottingham commented 4 years ago

https://github.com/ansible/awx/pull/7099 is a sample implementation of this.

This needs rethought/reworked in some ways:

There are more open questions that need thought through here.

gomker commented 4 years ago

@wenottingham As a workaround I currenlty use existing Ansible Tower modules to export data to JSON and parse this data back into another tower to syncronize multiple Tower instances. In my use case I prefer to update existing template and create new when does not exist. For credential managment I do this externally with other key management systems.

ryanpetrello commented 4 years ago

@wenottingham it seems like there's a lot of overlap on this issue and https://github.com/ansible/awx/issues/578 - do we want to pick one and close the other?