title: Ansible SSH private key in source control?
body: <p>I have been developing an Ansible playbook for a couple of weeks, therefore, my experience with such technology is relatively short. Part of my strategy includes using a custom <code>ansible_ssh_user</code> for provisioning hosts throughout the inventory, however, such user will need its own SSH key pair, which would involve some sort of a plan for holding/storing its correspondent private key. On a production environment, this playbook would be cloned/pulled and run inside a certain <em>playbook node</em> whose role is to provision the rest of the infrastructure.</p>
  
  <p>At first, I was thinking to just put that private key inside the playbook git repository, but I am having second thoughts about it nonetheless, mostly because of somewhat obvious security reasons and common sense around it, hence the reason I need to consult you about this matter. </p>
  
  <p>With this set on the table, here are the follow-up questions:</p>
  
  <ul>
  <li>In an Ansible-based development environment, is it sane/reasonable to hold a private SSH key in source control?</li>
  <li>Would this practice be advised <em>only for development environments</em> whereas another local git branch inside the <em>playbook node</em> would be then used to hold the actual production SSH private key?</li>
  <li>Would it be better to address this case scenario via Ansible Vault instead?, I have not ever used this before, but regardless of that I cannot yet tell whether this would be a proper case for using it.</li>
  <li>In your experience, what would be your approach around this in a production environment?, what would it be considered as the best practice in this particular scenario?</li>
  </ul>