# Automating the playbooks promotion to production

**URL:** <https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 13, 2022, 3:57am UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197 "2022-01-13T03:57:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabbisetty.hm](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pabbisetty.hm](https://forum.ansible.com/u/pabbisetty.hm)\
**Post date:** [January 13, 2022, 3:57am UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/1 "2022-01-13T03:57:28Z")

</div>

Hello team,

I am new to Awx and I find tool very interesting to learn.

Recently , our project went live but we had to manually create and deploy playbooks from dev to production.

I am looking for options on how to automate the code promotion(more than 10 gitlab projects at a time) using gitlab or any cicd tool from test to production.

Thank you in advance.

Venkata

---

<div class="post-metadata">

**Author:** ![Frank\_Dias](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Frank\_Dias](https://forum.ansible.com/u/Frank_Dias)\
**Post date:** [January 13, 2022, 4:30am UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/2 "2022-01-13T04:30:35Z")

</div>

You should befine a production branch in each project. In awx for production deployment refer to the production branch

---

<div class="post-metadata">

**Author:** ![pabbisetty.hm](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pabbisetty.hm](https://forum.ansible.com/u/pabbisetty.hm)\
**Post date:** [January 13, 2022, 2:27pm UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/3 "2022-01-13T14:27:37Z")

</div>

We are using same approach however, we need to sync the playbook from production branch during deployment.

---

<div class="post-metadata">

**Author:** ![Frank\_Dias](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Frank\_Dias](https://forum.ansible.com/u/Frank_Dias)\
**Post date:** [January 13, 2022, 3:17pm UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/4 "2022-01-13T15:17:02Z")

</div>

I am not in favor of that method, one should only pull from production after testing has released to production. I recommend that at the end of testing and passing is when it is synced/committed to production. We had a bad experience at one of my old companies with the way you are running now , code was added to test and they pulled to production and took down the app stack

---

<div class="post-metadata">

**Author:** ![Nik\_Tetteh-Lartey](https://avatars.discourse-cdn.com/v4/letter/n/9e8a1a/32.png) [@Nik\_Tetteh-Lartey](https://forum.ansible.com/u/Nik_Tetteh-Lartey)\
**Post date:** [January 13, 2022, 3:22pm UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/5 "2022-01-13T15:22:51Z")

</div>

Create a production branch from each git dev branch and add the production branches to AWX when your dev is ready to deploy.

---

<div class="post-metadata">

**Author:** ![pabbisetty.hm](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pabbisetty.hm](https://forum.ansible.com/u/pabbisetty.hm)\
**Post date:** [January 14, 2022, 3:49pm UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/6 "2022-01-14T15:49:59Z")

</div>

Thank you for inputs. Are there any other best practices that can help us? We are first time users. So any suggestion is welcomed. Thank you again?

---

<div class="post-metadata">

**Author:** ![Seth\_Foster](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Seth\_Foster](https://forum.ansible.com/u/Seth_Foster)\
**Post date:** [January 19, 2022, 9:04pm UTC](https://forum.ansible.com/t/automating-the-playbooks-promotion-to-production/36197/7 "2022-01-19T21:04:41Z")

</div>

Hi,

Also, if you haven’t already, be sure to checkout the awx.awx collection and write plays to help keep projects, job templates synced across your development and production installations.

Seth
