Skip to content

Commit

Permalink
Escalate permissions for build_project_repo role
Browse files Browse the repository at this point in the history
  • Loading branch information
thatbudakguy committed Dec 4, 2020
1 parent 9feac0c commit d3001e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/build_project_repo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,31 @@
msg: 'PATH: {{ path }} / LD_LIBRARY_PATH: {{ ld_library_path }} / PYTHONPATH: {{ python_path }} / ansible ansible_distribution_release: {{ ansible_distribution_release }}'
verbosity: 2
when: ansible_distribution == 'Springdale'

- name: Clone project repository and set to the correct version
git:
repo: '{{ repo_url }}/'
dest: '{{ clone_root }}/{{ repo }}'
version: '{{ gitref }}'
# register repo_info for group_vars
register: repo_info

- name: Get python package version
shell:
cmd: "python -c 'import {{ django_app }}; print({{ django_app }}.__version__)'"
chdir: "{{ clone_root}}/{{ repo }}"
register: python_app_version
tags:
- django

- name: Create the deploy directory (to recursively create parent dirs if necessary)
become: true
file:
state: directory
dest: '{{ deploy }}'

- name: Sync checkout to deploy directory
become: true
synchronize:
src: '{{ clone_root }}/{{ repo }}/'
# deploy constructed dynamicallly in group_vars
Expand All @@ -43,6 +48,7 @@
delegate_to: '{{ inventory_hostname }}'

- name: Set owner on deploy directory
become: true
file:
dest: "{{ deploy }}"
owner: "{{ deploy_user }}"
Expand Down

0 comments on commit d3001e1

Please sign in to comment.