Skip to content

Commit

Permalink
Add ServerAliveInterval option for long running tasks (#839)
Browse files Browse the repository at this point in the history
Add SSH option (ServerAliveInterval) to keep connection for long running shell tasks (>10 min)
  • Loading branch information
to-bar authored Feb 5, 2020
1 parent 139c994 commit 2f32046
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 5 additions & 1 deletion core/src/epicli/data/common/ansible/ansible_inventory.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2f32046

Please sign in to comment.