Skip to content

Instantly share code, notes, and snippets.

@cebe
Forked from tom--/abc.sls
Last active November 22, 2017 06:55
Show Gist options
  • Save cebe/6f68baa6cf2b030858b8414be4fcee13 to your computer and use it in GitHub Desktop.
Save cebe/6f68baa6cf2b030858b8414be4fcee13 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment