fix small bugs
This commit is contained in:
parent
8eec0b23e0
commit
e2357c3807
|
@ -31,7 +31,8 @@ env_vars:
|
|||
#LINK_TO_OTHER_EXPLORERS: "false" # If true, links to other explorers are added in the footer
|
||||
#USE_PLACEMENT_GROUP: "false" # If true, BlockScout instance will be created in the placement group
|
||||
##The following variables are optional
|
||||
#SUPPORTED_CHAINS: '[{ "title": "POA Core", "url": "https://blockscout.com/poa/core" }]' # JSON array with links to other exporers
|
||||
## SUPPORTED_CHAINS variable shoud have space before main content. This is due to the Ansible variable interpretation bug
|
||||
#SUPPORTED_CHAINS: ' [{ "title": "POA Core", "url": "https://blockscout.com/poa/core" }]' # JSON array with links to other exporers
|
||||
#FIRST_BLOCK: 0 # The block number, where indexing begins from.
|
||||
#COINMARKETCAP_PAGES: 10 # Sets the number of pages at Coinmarketcap to search coin at. Defaults to 10
|
||||
#METADATA_CONTRACT: # Address of metadata smart contract. Used by POA Network to obtain Validators information to display in the UI
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
- name: Fetch environment variables (via profile)
|
||||
set_fact:
|
||||
env_compiled: "{{ lookup('aws_ssm', path, aws_profile=aws_profile, shortnames=true, bypath=true, recursive=true ) }}"
|
||||
env_compiled: "{{ lookup('aws_ssm', path, region=aws_region|default('us-east-1'), aws_profile=aws_profile, shortnames=true, bypath=true, recursive=true ) }}"
|
||||
vars:
|
||||
path: "/{{ group_names[0] }}/{{ chain }}"
|
||||
when: aws_access_key is undefined
|
||||
|
@ -262,7 +262,7 @@
|
|||
- name: Update chain variables
|
||||
aws_ssm_parameter_store:
|
||||
name: "/{{ group_names[0] }}/{{ chain }}/{{ item.key }}"
|
||||
value: " {{ item.value }} "
|
||||
value: "{{ item.value }}"
|
||||
profile: "{{ profile }}"
|
||||
aws_access_key: "{{ access_key }}"
|
||||
aws_secret_key: "{{ secret_key }}"
|
||||
|
@ -291,7 +291,7 @@
|
|||
- deploy
|
||||
|
||||
- name: Upload Blockscout to S3
|
||||
command: "{{ 'AWS_ACCESS_KEY='~aws_access_key~' AWS_SECRET_ACCESS_KEY='~aws_secret_key~' AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} aws deploy push --application-name={{ group_names[0] }}-explorer --s3-location s3://{{ group_names[0] }}-explorer-codedeploy-releases/blockscout-{{ group_names[0] }}-{{ chain }}.zip --source=/tmp/blockscout-{{ group_names[0] }}-{{ chain }} {{ '--profile='~aws_profile if aws_profile is defined else '' }}"
|
||||
command: "{{ 'AWS_ACCESS_KEY='~aws_access_key~' AWS_SECRET_ACCESS_KEY='~aws_secret_key~' AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} aws deploy push --application-name={{ group_names[0] }}-explorer --s3-location s3://{{ group_names[0] }}-explorer-codedeploy-releases/blockscout-{{ group_names[0] }}-{{ chain }}.zip --source=/tmp/blockscout-{{ group_names[0] }}-{{ chain }} {{ '--profile='~aws_profile~' --region='~aws_region if aws_profile is defined else '' }}"
|
||||
register: push_output
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
|
@ -299,14 +299,14 @@
|
|||
|
||||
- name: Upload output
|
||||
debug:
|
||||
msg: "If deployment will fail, you can try to deploy blockscout manually using the following commands: {{ 'AWS_ACCESS_KEY=XXXXXXXXXXXXXX AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXX AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} {{ push_output.stdout_lines }} {{ '--profile='~aws_profile if aws_profile is defined else '' }}"
|
||||
msg: "If deployment will fail, you can try to deploy blockscout manually using the following commands: {{ 'AWS_ACCESS_KEY=XXXXXXXXXXXXXX AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXX AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} {{ push_output.stdout_lines }} {{ '--profile='~aws_profile~' --region'~aws_region if aws_profile is defined else '' }}"
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
- deploy
|
||||
|
||||
|
||||
- name: Deploy Blockscout
|
||||
command: "{{ 'AWS_ACCESS_KEY='~aws_access_key~' AWS_SECRET_ACCESS_KEY='~aws_secret_key~' AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} {{ push_output.stdout_lines[1] }} --deployment-group-name {{ group_names[0] }}-explorer-dg{{ groups[group_names[0]].index(inventory_hostname) }} --deployment-config-name CodeDeployDefault.OneAtATime {{ '--profile='~aws_profile if aws_profile is defined else '' }}"
|
||||
command: "{{ 'AWS_ACCESS_KEY='~aws_access_key~' AWS_SECRET_ACCESS_KEY='~aws_secret_key~' AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} {{ push_output.stdout_lines[1] }} --deployment-group-name {{ group_names[0] }}-explorer-dg{{ groups[group_names[0]].index(inventory_hostname) }} --deployment-config-name CodeDeployDefault.OneAtATime {{ '--profile='~aws_profile~' --region='~aws_region if aws_profile is defined else '' }}"
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
- deploy
|
||||
|
|
Loading…
Reference in New Issue