Did not need to check for prod.env
This commit is contained in:
@@ -2,68 +2,49 @@
|
||||
# This task puts all application variables in place for both workers and webservers
|
||||
#
|
||||
|
||||
- name: Does prod.env exist
|
||||
stat: path=/root/prod.env
|
||||
register: prod_env
|
||||
- name: Remove previous prod.env
|
||||
shell: rm /root/prod.env
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Create prod.env
|
||||
shell: touch /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Declare env file
|
||||
shell: echo export WRESTLINGDEV_ENV_FILE=/root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set env file permanently
|
||||
shell: echo WRESTLINGDEV_ENV_FILE=/root/prod.env >> /etc/environment
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set DB Name
|
||||
shell: echo WRESTLINGDEV_DB_NAME={{ lookup('env', 'WRESTLINGDEV_DB_NAME') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set db password
|
||||
shell: echo WRESTLINGDEV_DB_PWD={{ lookup('env', 'WRESTLINGDEV_DB_PWD') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set db username
|
||||
shell: echo WRESTLINGDEV_DB_USR={{ lookup('env', 'WRESTLINGDEV_DB_USR') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set db host
|
||||
shell: echo WRESTLINGDEV_DB_HOST={{ lookup('env', 'WRESTLINGDEV_DB_HOST') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set db port
|
||||
shell: echo WRESTLINGDEV_DB_PORT={{ lookup('env', 'WRESTLINGDEV_DB_PORT') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set devise secret key
|
||||
shell: echo WRESTLINGDEV_DEVISE_SECRET_KEY={{ lookup('env', 'WRESTLINGDEV_DEVISE_SECRET_KEY') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set secret key base
|
||||
shell: echo WRESTLINGDEV_SECRET_KEY_BASE={{ lookup('env', 'WRESTLINGDEV_SECRET_KEY_BASE') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set new relic license
|
||||
shell: echo WRESTLINGDEV_NEW_RELIC_LICENSE_KEY={{ lookup('env', 'WRESTLINGDEV_NEW_RELIC_LICENSE_KEY') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set memcached username
|
||||
shell: echo MEMCACHIER_USERNAME={{ lookup('env', 'MEMCACHIER_USERNAME') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set memcached password
|
||||
shell: echo MEMCACHIER_PASSWORD={{ lookup('env', 'MEMCACHIER_PASSWORD') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set memcached servers
|
||||
shell: echo MEMCACHIER_SERVERS={{ lookup('env', 'MEMCACHIER_SERVERS') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
- name: Set email password
|
||||
shell: echo WRESTLINGDEV_EMAIL_PWD={{ lookup('env', 'WRESTLINGDEV_EMAIL_PWD') }} >> /root/prod.env
|
||||
when: prod_env|failed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user