Ansible role to configure ssh server.
Destination paths are prefixed with {{ test_dir }}
so during testing files are created/modified in isolated location.
-
defaults
sshd_firewalld: {} # firewalld settings sshd_banner: {} # banner file attributes sshd_prompt: {} # prompt script attributes sshd_AllowUsers: [] # list of users allowed to connect sshd_AuthenticationMethods: [] # list of methods allowed to use for connect sshd_AcceptEnv: [] # list of AcceptEnv parameters # each item = single line in config file
-
vars
test_files: [] # list of files included in tests # (to create subdirectories) sshd_pkgs: - name: [] # list of ssh server software packages sshd_config: {} # sshd_config file attributes sshd_service: "" # sshd service name
-
requirements.yaml
- name: sshd src: https://github.com/mario-slowinski/sshd
-
playbook.yaml
- hosts: servers gather_facts: true # to get ansible_os_family roles: - role: sshd
-
testing,
test_dir
must exist and end with/
ansible-playbook -i inventory -e test_dir=/tmp playbook.yaml