Skip to content

Instantly share code, notes, and snippets.

@tom--
Last active November 22, 2017 06:54
Show Gist options
  • Save tom--/25574c04a4105d3e0a890e3ba85fb913 to your computer and use it in GitHub Desktop.
Save tom--/25574c04a4105d3e0a890e3ba85fb913 to your computer and use it in GitHub Desktop.
a:
lorem.ipsum
x:
lorem.dolor
y:
lorem.sit
b:
lorem.amet:
- require:
- lorem: a
- lorem: x
- lorem: y
c:
lorem.consectetur:
- require:
- lorem: b
git install for v2:
pkg.installed:
- name: git
bitbucket deploy key:
file.managed:
- name: /root/.ssh/id_rsa_deploy
- source: salt://v2/ssh/id_rsa_deploy
- mode: '0400'
- makedirs: True
- dir_mode: '0700'
bitbucket host:
ssh_known_hosts.present:
- name: bitbucket.org
- user: root
- enc: ssh-rsa
- key: ___
bitbucket git:
git.config_set:
- name: user.email
- value: "www@{{ grains['id'] }}.fooo.com"
- user: root
- global: True
require:
- pkg: git install for v2
- file: bitbucket deploy key
- ssh_known_hosts: bitbucket host
v2 application:
git.latest:
- name: {{ pillar.v2_git_repo }}
- rev: {{ salt['pillar.get']( 'v2_git_rev', 'production') }}
- target: {{ pillar.v2_doc_root }}
- force_checkout: True
- force_clone: True
- force_reset: True
- identity: /root/.ssh/id_rsa_deploy
- require:
- git: bitbucket git
@tom--
Copy link
Author

tom-- commented Nov 21, 2017

the state v2 application fails with

     Comment: Failed to check remote refs: Unable to authenticate using identity file:
              The following identity file(s) were not found: /root/.ssh/id_rsa_deploy 

the state bitbucket deploy key runs after v2 application even though the dependencies would require it to run before, afaiu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment