Skip to content

Commit

Permalink
Merge pull request #34 from companieshouse/feature/add-env-file-path-var
Browse files Browse the repository at this point in the history
Add variable for environment file path
  • Loading branch information
marcransome authored Jun 22, 2021
2 parents f9e08ed + 74d3e13 commit ac5069b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions roles/deploy/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
private_host_address: "{{ inventory_hostname }}"
private_host_local_domain_port: "{{ tuxedo_service_config[tuxedo_user].local_domain_port }}"
service_name: "{{ tuxedo_user }}"
tuxedo_env_file_path: "/home/{{ tuxedo_user }}/deployment/config/envfile"
shared_memory_id: "{{ tuxedo_service_config[tuxedo_user].shared_memory_id }}"
tuxedo_domain_id: "{{ tuxedo_user | upper }}_{{ tuxedo_domain_id_suffix }}"
tuxedo_group_id: "{{ getent_passwd[tuxedo_user][getent_gid_index] }}"
Expand Down Expand Up @@ -89,23 +90,23 @@

- name: "{{ tuxedo_user }} : Stop ngSrv services"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && ngsrv.sh stop"
shell: "source {{ tuxedo_env_file_path }} && ngsrv.sh stop"
args:
executable: /bin/bash
ignore_errors: yes
when: current_deployment_files.stat.exists

- name: "{{ tuxedo_user }} : Stop Tuxedo services"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && tmshutdown -y"
shell: "source {{ tuxedo_env_file_path }} && tmshutdown -y"
args:
executable: /bin/bash
ignore_errors: yes
when: current_deployment_files.stat.exists

- name: "{{ tuxedo_user }} : Clear IPC facilities"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && zapipc"
shell: "source {{ tuxedo_env_file_path }} && zapipc"
args:
executable: /bin/bash
when: current_deployment_files.stat.exists
Expand All @@ -126,7 +127,7 @@

- name: "{{ tuxedo_user }} : Lint Tuxedo ubbconfig file after variable population"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && tmloadcf -n ubbconfig"
shell: "source {{ tuxedo_env_file_path }} && tmloadcf -n ubbconfig"
args:
chdir: "/home/{{ tuxedo_user }}/{{ deployment_dir }}/config"
executable: /bin/bash
Expand All @@ -141,14 +142,14 @@

- name: "{{ tuxedo_user }} : Generate Tuxedo binary tuxconfig file"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && tmloadcf -y ubbconfig"
shell: "source {{ tuxedo_env_file_path }} && tmloadcf -y ubbconfig"
args:
chdir: "/home/{{ tuxedo_user }}/{{ deployment_dir }}/config"
executable: /bin/bash

- name: "{{ tuxedo_user }} : Lint Tuxedo dmconfig file after variable population"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && dmloadcf -n dmconfig"
shell: "source {{ tuxedo_env_file_path }} && dmloadcf -n dmconfig"
args:
chdir: "/home/{{ tuxedo_user }}/{{ deployment_dir }}/config"
executable: /bin/bash
Expand All @@ -163,7 +164,7 @@

- name: "{{ tuxedo_user }} : Generate Tuxedo binary bdmconfig file"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && dmloadcf -y dmconfig"
shell: "source {{ tuxedo_env_file_path }} && dmloadcf -y dmconfig"
args:
chdir: "/home/{{ tuxedo_user }}/{{ deployment_dir }}/config"
executable: /bin/bash
Expand All @@ -176,12 +177,12 @@

- name: "{{ tuxedo_user }} : Start Tuxedo services"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && tmboot -y"
shell: "source {{ tuxedo_env_file_path }} && tmboot -y"
args:
executable: /bin/bash

- name: "{{ tuxedo_user }} : Start ngSrv services"
become_user: "{{ tuxedo_user }}"
shell: "source $HOME/deployment/config/envfile && ngsrv.sh start"
shell: "source {{ tuxedo_env_file_path }} && ngsrv.sh start"
args:
executable: /bin/bash

0 comments on commit ac5069b

Please sign in to comment.