library/roles/sshd_config: Use a variable to optionally skip the task.

d4science-ghn-cluster/group_vars/dataminer_garr/dataminer_garr.yml: Do not install sshd_config.
This commit is contained in:
Andrea Dell'Amico 2017-02-08 18:58:00 +01:00
parent af43d0db1e
commit 69cf335a87
2 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
---
sshd_install_config: True
sshd_port: 22
sshd_config_dir: /etc/ssh
sshd_config_file: sshd_config

View File

@ -2,4 +2,5 @@
- name: Install the sshd configuration file
template: src=sshd_config.j2 dest={{ sshd_config_dir }}/{{ sshd_config_file }} owner=root group=root mode=0644
notify: Reload the ssh service
when: sshd_install_config
tags: [ 'ssh', 'sshd_config' ]