ansible/roles/openssh/tasks/main.yaml

28 lines
620 B
YAML
Raw Normal View History

2019-03-13 06:48:49 +00:00
---
- name: gather OS specific variables
include_vars: "{{ item }} "
with_first_found:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
2019-03-16 20:35:52 +00:00
2019-03-13 06:48:49 +00:00
- name: install openssh
package:
name: "{{ openssh_package_name }}"
state: "{{ openssh_package_state }}"
- name: configure openssh
template:
src: sshd_config.j2
dest: /etc/ssh/sshd_config
validate: sshd -t -f %s
notify:
- reload openssh
- name: start openssh
service:
name: "{{ openssh_service_name }}"
state: "{{ openssh_service_state }}"
enabled: "{{ openssh_service_enabled }}"
2019-03-27 07:08:13 +00:00
# vim:ft=yaml.ansible: