# Dynamically choosing an SCM revision on job execution with Ansible Tower

**URL:** <https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670>\
**Category:** Ansible Project\
**Created:** [February 27, 2014, 8:30pm UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670 "2014-02-27T20:30:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul.zielinski](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@paul.zielinski](https://forum.ansible.com/u/paul.zielinski)\
**Post date:** [February 27, 2014, 8:30pm UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670/1 "2014-02-27T20:30:51Z")

</div>

I’m evaluating Ansible Tower as a way to manage configuration and deployment of applications.

I’ve built a small application with an interface to the REST API to manage some of the more complicated steps in the deployment process (for example, logging a ‘build’ in the system upon a successful Jenkins job, and tracking its deployment to various environments), and there is one piece of the puzzle I can’t figure out.

We’re using playbooks and templates to manage config files on servers in what seems to be a pretty standard way, with a ‘project’ set up for a branch of our playbooks git repository, but it doesn’t look like there is a way of picking a particular git revision when executing a job. It would be really nice to, when triggering a job template, tell it which git commit (or tag) we want it to use, since config changes associated with a particular build can best be tracked by git commit, and not simply whatever’s been pushed to a particular branch. One reason for this is, lets say we have changes to group\_vars/prod that need to go out on the next push. If those changes were simply pushed to the prod branch of our repository in anticipation of the push, any new production servers brought up before the actual deployment process happened (that is, servers that would have the playbook executed on them between the commit and the actual deployment) would be erroneously getting the new settings. And I’m hoping to avoid complicating the otherwise push-button deployment process with a merge-to-a-git-branch step.

Has anyone here dealt with this sort of use case? Is there a way around it?

_tl;dr: Can I choose a specific scm tag or revision a job will run its playbooks from in Ansible Tower?_

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 28, 2014, 2:03pm UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670/2 "2014-02-28T14:03:20Z")

</div>

Hi Paul,

Please ask tower questions to [support@ansible.com](mailto:support@ansible.com) and we’d be glad to help out.

This list is for the core open source project.

Thanks!

–Michael

---

<div class="post-metadata">

**Author:** ![D11](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@D11](https://forum.ansible.com/u/D11)\
**Post date:** [August 2, 2018, 7:00am UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670/3 "2018-08-02T07:00:58Z")

</div>

did you find this ? or how you are managing it, i am interested too.

---

<div class="post-metadata">

**Author:** ![Badraj\_Angirekula](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@Badraj\_Angirekula](https://forum.ansible.com/u/Badraj_Angirekula)\
**Post date:** [August 2, 2018, 7:54am UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670/4 "2018-08-02T07:54:12Z")

</div>

Hi all I am facing error in aws please help.

[root@server2 ~]# ssh -i bhadra.pem ec2-user@ec2-50-112-6-190.us-west-2.compute. [amazonaws.com](http://amazonaws.com)  
The authenticity of host ‘[ec2-50-112-6-190.us-west-2.compute.amazonaws.com](http://ec2-50-112-6-190.us-west-2.compute.amazonaws.com) (50.1 12.6.190)’ can’t be established.  
ECDSA key fingerprint is 1f:1b:6b:13:d2:7a:b5:a4:4b:78:84:b7:98:05:ab:39.  
Are you sure you want to continue connecting (yes/no)? yes  
Warning: Permanently added ‘[ec2-50-112-6-190.us-west-2.compute.amazonaws.com](http://ec2-50-112-6-190.us-west-2.compute.amazonaws.com),50. 112.6.190’ (ECDSA) to the list of known hosts.  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
Permissions 0644 for ‘bhadra.pem’ are too open.  
It is required that your private key files are NOT accessible by others.  
This private key will be ignored.  
bad permissions: ignore key: bhadra.pem  
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

---

<div class="post-metadata">

**Author:** ![Raymond\_Saga](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@Raymond\_Saga](https://forum.ansible.com/u/Raymond_Saga)\
**Post date:** [August 2, 2018, 9:03am UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670/5 "2018-08-02T09:03:03Z")

</div>

You should limit the access to 600, try to run chmod 600 and try again

---

<div class="post-metadata">

**Author:** ![vaibhav\_kanchan](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vaibhav\_kanchan](https://forum.ansible.com/u/vaibhav_kanchan)\
**Post date:** [August 2, 2018, 9:37am UTC](https://forum.ansible.com/t/dynamically-choosing-an-scm-revision-on-job-execution-with-ansible-tower/14670/6 "2018-08-02T09:37:19Z")

</div>

Try chmod 400 instead of 600 and check if it gives same error
