--- - name: Check if there's a Stonith configuration up command: pcs stonith register: stonith_output - name: Create Stonith config command: pcs stonith create {{ stonith_config_name }} fence_aws region=us-east-1 pcmk_host_map='{{ THIS_HOSTNAME }}:{{ this_instance_id }}; {{ opposite_host }}:{{ opposite_instance_id }}' power_timeout=240 pcmk_reboot_timeout=480 pcmk_reboot_retries=4 pcmk_delay_max=45 op start timeout=300 op monitor interval=300 timeout=60 when: not stonith_config_name in stonith_output.stdout - name: Update Stonith config command: pcs stonith update {{ stonith_config_name }} fence_aws region=us-east-1 pcmk_host_map='{{ THIS_HOSTNAME }}:{{ this_instance_id }}; {{ opposite_host }}:{{ opposite_instance_id }}' power_timeout=600 pcmk_reboot_timeout=600 pcmk_reboot_retries=4 pcmk_delay_max=25 op start timeout=300 op monitor interval=300 timeout=60 when: stonith_config_name in stonith_output.stdout