forked from linux-system-roles/ssh
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests_custom_config.yml
More file actions
28 lines (26 loc) · 969 Bytes
/
tests_custom_config.yml
File metadata and controls
28 lines (26 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
- name: Test we can write any other configuration file
hosts: all
tasks:
- name: Run role
include_tasks: tasks/run_role_with_clear_facts.yml
vars:
ssh:
Compression: true
GSSAPIAuthentication: false
ssh_config_file: /tmp/ssh_config
ssh_skip_defaults: true
- name: Verify the configuration file was created in the right place
block:
- name: Download the custom configuration file
slurp:
src: /tmp/ssh_config
register: config
- name: Verify the options are in the file
assert:
that:
- "'Compression yes' in config.content | b64decode"
- "'GSSAPIAuthentication no' in config.content | b64decode"
# common defaults should be skipped (ssh_skip_defaults=true)
- "'Include' not in config.content | b64decode"
- "'SendEnv' not in config.content | b64decode"