deploy: Add deployment keyfile variables to inventory

This commit is contained in:
James Graham committed 2020-04-17 11:38:10 +01:00
1 parent fa07b13fbd
commit 2b0ba8d12e
2 files changed
+20 -5

No files matched your search

+19 -3
View File
@@ -63,20 +63,36 @@
- name: Copy deploy key
copy:
src: 'deployment-key'
src: '{{ deployment_keyfile }}'
dest: '/tmp/deployment-key'
mode: 0600
when: vagrant_dir.stat.exists == False
when: vagrant_dir.stat.exists == False and deployment_keyfile is defined
- name: Clone / update from source repo
git:
repo: '[email protected]:Southampton-RSG/breccia-mapper.git'
dest: '{{ project_dir }}'
key_file: '/tmp/deployment-key'
key_file: '{{ "/tmp/deployment-key" if deployment_keyfile is defined else None }}'
version: '{{ branch | default ("master") }}'
accept_hostkey: yes
when: vagrant_dir.stat.exists == False
- name: Copy customisation deploy key
copy:
src: '{{ customisation_repo_keyfile }}'
dest: '/tmp/deployment-key-customisation'
mode: 0600
when: customisation_repo_keyfile is defined
- name: Clone / update from customisation repo
git:
repo: '{{ customisation_repo }}'
dest: '{{ project_dir }}/custom'
key_file: '{{ "/tmp/deployment-key-customisation" if customisation_repo_keyfile is defined else None }}'
version: '{{ branch | default ("master") }}'
accept_hostkey: yes
when: customisation_repo is defined
- name: Copy and populate settings template
template:
src: 'settings.j2'