Advertisement
Guest User

Untitled

a guest
Dec 28th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. # We set up projects based on what is set up in the pillar data
  2. # find settings in pillar/projects.sls
  3.  
  4. {% for project, project_arg in pillar.get('projects',{}).items() %}
  5. load-project-{{ project }}:
  6. git.latest:
  7. - name: {{ project_arg['name'] }}
  8. {% if project_arg['rev'] is defined and project_arg['rev'] != '' %}- rev: {{ project_arg['rev'] }}{%- endif %}
  9. - target: /var/www/{{ project_arg['target'] }}
  10. {% if project_arg['remote_name'] is defined and project_arg['remote_name'] != '' %}- remote_name: {{ project_arg['remote_name'] }}{%- endif %}
  11. {% if project_arg['force'] is defined and project_arg['force'] == 'True' %}- force: True{%- endif %}
  12. - unless: cd /var/www/{{ project_arg['target'] }}/provision/salt/config #maybe this shouldn't be at all?
  13. {% if project_arg['submodules'] is defined and project_arg['submodules'] == 'True' %}- submodules: True{%- endif %}
  14. {% if project_arg['force_checkout'] is defined and project_arg['force_checkout'] == 'True' %}- force_checkout: True{%- endif %}
  15. {% if project_arg['mirror'] is defined and project_arg['mirror'] == 'True' %}- mirror: True{%- endif %}
  16. {% if project_arg['bare'] is defined and project_arg['bare'] == 'True' %}- bare: True{%- endif %}
  17. {% if project_arg['identity'] is defined and project_arg['identity'] != '' %}- identity: {{ project_arg['identity'] }}{%- endif %}
  18. {% if project_arg['user'] is defined and project_arg['user'] != '' %}- user: {{ project_arg['user'] }}{%- endif %}
  19. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement