accept enter key or other
This commit is contained in:
parent
ce09070b86
commit
fdcf6efc56
|
@ -225,7 +225,7 @@
|
|||
pause:
|
||||
prompt: "Would you like to remove staging dependencies? [Yes/No]"
|
||||
register: user_answer
|
||||
until: user_answer.user_input | lower in conditional
|
||||
until: user_answer.user_input | lower in conditional
|
||||
retries: 10000
|
||||
delay: 1
|
||||
vars:
|
||||
|
@ -244,7 +244,7 @@
|
|||
- "/tmp/blockscout-{{ group_names[0] }}-{{ chain }}/apps/block_scout_web/assets/node_modules/"
|
||||
- "/tmp/blockscout-{{ group_names[0] }}-{{ chain }}/apps/explorer/node_modules/"
|
||||
- "/tmp/blockscout-{{ group_names[0] }}-{{ chain }}/logs/dev/"
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input == "" or hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
- build
|
||||
|
||||
|
@ -260,11 +260,11 @@
|
|||
pause:
|
||||
prompt: "Do you want to update the Parameter Store variables? [Yes/No]"
|
||||
register: user_answer
|
||||
until: user_answer.user_input | lower in conditional
|
||||
until: user_answer.user_input | lower in conditional
|
||||
retries: 10000
|
||||
delay: 1
|
||||
vars:
|
||||
conditional: ['yes','no','true','false']
|
||||
conditional: ["",'yes','no','true','false']
|
||||
when: inventory_hostname == groups['all'][0]
|
||||
tags:
|
||||
- update_vars
|
||||
|
@ -283,7 +283,7 @@
|
|||
profile: "{{ aws_profile|default(omit) }}"
|
||||
region: "{{ aws_region|default(omit) }}"
|
||||
with_dict: "{{ lower_env }}"
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool and lower_env is defined
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input == "" or hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
- update_vars
|
||||
|
||||
|
@ -295,7 +295,7 @@
|
|||
retries: 10000
|
||||
delay: 1
|
||||
vars:
|
||||
conditional: ['yes','no','true','false']
|
||||
conditional: ["",'yes','no','true','false']
|
||||
when: inventory_hostname == groups['all'][0]
|
||||
tags:
|
||||
- deploy
|
||||
|
@ -303,21 +303,21 @@
|
|||
- 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~' --region='~aws_region if aws_profile is defined else '' }}"
|
||||
register: push_output
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input == "" or hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
- deploy
|
||||
|
||||
- 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~' --region'~aws_region if aws_profile is defined else '' }}"
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input == "" or 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~' --region='~aws_region if aws_profile is defined else '' }}"
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
when: hostvars[groups['all'][0]].user_answer.user_input == "" or hostvars[groups['all'][0]].user_answer.user_input | lower | bool
|
||||
tags:
|
||||
- deploy
|
||||
|
||||
|
|
Loading…
Reference in New Issue