From 2f32046533bdbd8b0153827efcb1c102c093a5eb Mon Sep 17 00:00:00 2001 From: to-bar <46519524+to-bar@users.noreply.github.com> Date: Wed, 5 Feb 2020 13:26:32 +0100 Subject: [PATCH] Add ServerAliveInterval option for long running tasks (#839) Add SSH option (ServerAliveInterval) to keep connection for long running shell tasks (>10 min) --- core/src/epicli/data/common/ansible/ansible_inventory.j2 | 6 +++++- .../common/ansible/playbooks/roles/common/tasks/main.yml | 8 ++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/epicli/data/common/ansible/ansible_inventory.j2 b/core/src/epicli/data/common/ansible/ansible_inventory.j2 index 16e1d9042a..18dd4073e4 100644 --- a/core/src/epicli/data/common/ansible/ansible_inventory.j2 +++ b/core/src/epicli/data/common/ansible/ansible_inventory.j2 @@ -16,5 +16,9 @@ [all:vars] ansible_user={{ cluster_model.specification.admin_user.name }} ansible_ssh_private_key_file={{ cluster_model.specification.admin_user.key_path }} -# todo: settings of StrictHostKeyChecking from epiphany configuration +# --- SSH options --- +# todo: manage StrictHostKeyChecking from Epiphany configuration +# Always appended to the default command line for sftp, scp, and ssh ansible_ssh_common_args='-o StrictHostKeyChecking=no' +# Always appended to the default ssh command line +ansible_ssh_extra_args='-o ServerAliveInterval=60 -o ServerAliveCountMax=1' diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/common/tasks/main.yml b/core/src/epicli/data/common/ansible/playbooks/roles/common/tasks/main.yml index 5b7186cc9a..6bbdd9856c 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/common/tasks/main.yml +++ b/core/src/epicli/data/common/ansible/playbooks/roles/common/tasks/main.yml @@ -8,13 +8,9 @@ - include_tasks: "{{ ansible_os_family }}.yml" -- name: Get environment variables - command: env - register: env_output - changed_when: false - - name: Print environment variables - debug: msg={{ env_output.stdout_lines }} + debug: + msg: "{{ ansible_env }}" - name: Adjust swappiness parameter sysctl: