Handle unreachable rproxy when deploying lrproxy

This commit is contained in:
Wojciech Kozlowski 2023-02-21 00:06:57 +01:00
parent 4f3c9988ef
commit 80461775ef
3 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,9 @@ argument_specs:
type: "dict" type: "dict"
elem: "dict" elem: "dict"
required: true required: true
services_deploy_lrproxy_ignore_unreachable_rproxy:
type: "bool"
required: true
services_host_services: services_host_services:
lrproxy: lrproxy:
rproxy_host: rproxy_host:

View File

@ -99,6 +99,7 @@
register: services_deploy_lrproxy_keypair register: services_deploy_lrproxy_keypair
- name: "configure public key on {{ services_host_services.lrproxy.rproxy_host }}" - name: "configure public key on {{ services_host_services.lrproxy.rproxy_host }}"
ignore_unreachable: "{{ services_deploy_lrproxy_ignore_unreachable_rproxy }}"
delegate_to: "{{ services_host_services.lrproxy.rproxy_host }}" delegate_to: "{{ services_host_services.lrproxy.rproxy_host }}"
become_user: "{{ services_host_services.lrproxy.rproxy_user }}" become_user: "{{ services_host_services.lrproxy.rproxy_user }}"
ansible.posix.authorized_key: ansible.posix.authorized_key:

View File

@ -52,6 +52,9 @@
- "services:deploy" - "services:deploy"
- "services:deploy:{{ services_service_name }}" - "services:deploy:{{ services_service_name }}"
- "services:{{ services_service_name }}:deploy" - "services:{{ services_service_name }}:deploy"
vars:
services_deploy_lrproxy_ignore_unreachable_rproxy: "\
{{ not (the_nine_worlds_production | bool) }}"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}" loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control: loop_control:
loop_var: "services_service_name" loop_var: "services_service_name"