diff --git a/.github/actions/provision/action.yml b/.github/actions/provision/action.yml index 63aaa809..71018dd8 100644 --- a/.github/actions/provision/action.yml +++ b/.github/actions/provision/action.yml @@ -11,5 +11,3 @@ runs: source ./ci.env source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT" ansible-playbook stackhpc.azimuth_ops.provision -e @extra-vars.yml - env: - ANSIBLE_CALLBACKS_ENABLED: ansible.posix.profile_tasks diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 6d64394e..cc6221a1 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -153,8 +153,9 @@ runs: ansible_var() { ANSIBLE_LOAD_CALLBACK_PLUGINS=true \ ANSIBLE_STDOUT_CALLBACK=json \ + ANSIBLE_JSON_INDENT=0 \ ansible -m debug -a "var=$1" -e @extra-vars.yml all | \ - jq -r ".plays[0].tasks[0].hosts.localhost.$1" + jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1" } EXTNET_ID="$(ansible_var infra_external_network_id)" diff --git a/.github/environments/arcus-ha/ansible.cfg b/.github/environments/arcus-ha/ansible.cfg index 9fe26b27..3e4723a5 100644 --- a/.github/environments/arcus-ha/ansible.cfg +++ b/.github/environments/arcus-ha/ansible.cfg @@ -2,8 +2,14 @@ inventory = ../../../environments/base/inventory,../../../environments/ha/inventory,../../../environments/demo/inventory,../common/inventory,../arcus/inventory,./inventory roles_path = ../../../.ansible/roles collections_path = ../../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks +# Disable host key checking as hosts are dynamically replaced host_key_checking = False [ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h retries = 3 diff --git a/.github/environments/arcus/ansible.cfg b/.github/environments/arcus/ansible.cfg index 4a0b1cab..cc6dbcb7 100644 --- a/.github/environments/arcus/ansible.cfg +++ b/.github/environments/arcus/ansible.cfg @@ -2,8 +2,14 @@ inventory = ../../../environments/base/inventory,../../../environments/singlenode/inventory,../../../environments/demo/inventory,../common/inventory,./inventory roles_path = ../../../.ansible/roles collections_path = ../../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks +# Disable host key checking as hosts are dynamically replaced host_key_checking = False [ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h retries = 3 diff --git a/.github/environments/leafcloud-ha/ansible.cfg b/.github/environments/leafcloud-ha/ansible.cfg index 9ec319af..43fa4009 100644 --- a/.github/environments/leafcloud-ha/ansible.cfg +++ b/.github/environments/leafcloud-ha/ansible.cfg @@ -2,8 +2,14 @@ inventory = ../../../environments/base/inventory,../../../environments/ha/inventory,../../../environments/demo/inventory,../common/inventory,../leafcloud/inventory,./inventory roles_path = ../../../.ansible/roles collections_path = ../../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks +# Disable host key checking as hosts are dynamically replaced host_key_checking = False [ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h retries = 3 diff --git a/.github/environments/leafcloud/ansible.cfg b/.github/environments/leafcloud/ansible.cfg index 4a0b1cab..cc6dbcb7 100644 --- a/.github/environments/leafcloud/ansible.cfg +++ b/.github/environments/leafcloud/ansible.cfg @@ -2,8 +2,14 @@ inventory = ../../../environments/base/inventory,../../../environments/singlenode/inventory,../../../environments/demo/inventory,../common/inventory,./inventory roles_path = ../../../.ansible/roles collections_path = ../../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks +# Disable host key checking as hosts are dynamically replaced host_key_checking = False [ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h retries = 3 diff --git a/bin/create-debug-bundle b/bin/create-debug-bundle index 94f21de2..fa74dd4b 100755 --- a/bin/create-debug-bundle +++ b/bin/create-debug-bundle @@ -16,8 +16,9 @@ fi ansible_variable() { ANSIBLE_LOAD_CALLBACK_PLUGINS=true \ ANSIBLE_STDOUT_CALLBACK=json \ + ANSIBLE_JSON_INDENT=0 \ ansible -m debug -a "var=$1" all | \ - jq -r ".plays[0].tasks[0].hosts.localhost.$1" + jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1" } diff --git a/bin/port-forward b/bin/port-forward index 3ec3f107..65a2d1d0 100755 --- a/bin/port-forward +++ b/bin/port-forward @@ -17,8 +17,9 @@ fi ansible_variable() { ANSIBLE_LOAD_CALLBACK_PLUGINS=true \ ANSIBLE_STDOUT_CALLBACK=json \ + ANSIBLE_JSON_INDENT=0 \ ansible -m debug -a "var=$1" all | \ - jq -r ".plays[0].tasks[0].hosts.localhost.$1" + jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1" } diff --git a/bin/run-tests b/bin/run-tests index f83e4c04..e005351a 100755 --- a/bin/run-tests +++ b/bin/run-tests @@ -16,8 +16,9 @@ fi ansible_variable() { ANSIBLE_LOAD_CALLBACK_PLUGINS=true \ ANSIBLE_STDOUT_CALLBACK=json \ + ANSIBLE_JSON_INDENT=0 \ ansible -m debug -a "var=$1" all | \ - jq -r ".plays[0].tasks[0].hosts.localhost.$1" + jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1" } diff --git a/bin/seed-ssh b/bin/seed-ssh index 9f2a0e61..f00bb422 100755 --- a/bin/seed-ssh +++ b/bin/seed-ssh @@ -17,8 +17,9 @@ fi ansible_variable() { ANSIBLE_LOAD_CALLBACK_PLUGINS=true \ ANSIBLE_STDOUT_CALLBACK=json \ + ANSIBLE_JSON_INDENT=0 \ ansible -m debug -a "var=$1" all | \ - jq -r ".plays[0].tasks[0].hosts.localhost.$1" + jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1" } diff --git a/bin/tilt-up b/bin/tilt-up index 3f805d65..49aa8653 100755 --- a/bin/tilt-up +++ b/bin/tilt-up @@ -24,8 +24,9 @@ fi ansible_variable() { ANSIBLE_LOAD_CALLBACK_PLUGINS=true \ ANSIBLE_STDOUT_CALLBACK=json \ + ANSIBLE_JSON_INDENT=0 \ ansible -m debug -a "var=$1" all | \ - jq -r ".plays[0].tasks[0].hosts.localhost.$1" + jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1" } diff --git a/environments/capi-mgmt-example/ansible.cfg b/environments/capi-mgmt-example/ansible.cfg index e88c9e01..d33bc766 100644 --- a/environments/capi-mgmt-example/ansible.cfg +++ b/environments/capi-mgmt-example/ansible.cfg @@ -4,6 +4,14 @@ inventory = ../base/inventory,../ha/inventory,../capi-mgmt/inventory,./inventory roles_path = ../../.ansible/roles collections_path = ../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks # Disable host key checking as hosts are dynamically replaced host_key_checking = False + +[ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h +retries = 3 diff --git a/environments/demo/ansible.cfg b/environments/demo/ansible.cfg index a5829053..0fcfa432 100644 --- a/environments/demo/ansible.cfg +++ b/environments/demo/ansible.cfg @@ -2,5 +2,14 @@ inventory = ../base/inventory,../singlenode/inventory,./inventory roles_path = ../../.ansible/roles collections_path = ../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks +# Disable host key checking as hosts are dynamically replaced host_key_checking = False + +[ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h +retries = 3 diff --git a/environments/example/ansible.cfg b/environments/example/ansible.cfg index 6e2b951f..f08750f3 100644 --- a/environments/example/ansible.cfg +++ b/environments/example/ansible.cfg @@ -4,6 +4,14 @@ inventory = ../base/inventory,../ha/inventory,./inventory roles_path = ../../.ansible/roles collections_path = ../../.ansible/collections +stdout_callback = yaml +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks # Disable host key checking as hosts are dynamically replaced host_key_checking = False + +[ssh_connection] +pipelining = True +ssh_extra_args = -o ControlPersist=1h +retries = 3