Skip to content

Commit

Permalink
#30: adjustments of provisioning for a production environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh committed Jul 12, 2019
1 parent ae84d8c commit e38aae3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions provisioning/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[openwind]
localhost ansible_connection=local
1 change: 1 addition & 0 deletions provisioning/roles/geospaas/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
src={{ project_home }}/{{ project_name }}
state=link
force=yes
ignore_errors: yes

#- name: geospaas | Link geospaas from site-packages
# file: path='{{ python_dist_packages }}/openwind'
Expand Down
5 changes: 3 additions & 2 deletions provisioning/roles/openwind/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

- name: openwind | Change owner of anaconda directory (otherwise later provisioning will fail)
shell: "sudo chown -R vagrant {{ conda_dir }}/"
ignore_errors: yes

- name: openwind | create file activate.d/env_vars.sh in conda env
file:
Expand Down Expand Up @@ -69,13 +70,13 @@

- name: openwind | Sync script heading
lineinfile:
path: /home/vagrant/daily_sync.sh
path: "{{ project_home }}/daily_sync.sh"
insertbefore: BOF
line: "#!/bin/bash"

- name: openwind | Sync script content
blockinfile:
path: /home/vagrant/daily_sync.sh
path: "{{ project_home }}/daily_sync.sh"
block: |
export PROJ_LIB={{ conda_dir }}/envs/{{ env_name }}/share/proj
source {{ conda_dir }}/bin/activate {{ env_name }}
Expand Down

0 comments on commit e38aae3

Please sign in to comment.