- - name: Install ssh packages
- apt: pkg={{ item }} state=installed update_cache=yes
- with_items:
- - openssh-server
- - openssh-client
- when: with_ssh
- - name: Install sshd configuration
- template: src=ssh/sshd_config.j2 dest=/etc/ssh/sshd_config owner=root group=root mode=0644
- notify:
- - Restart ssh
- when: with_ssh
- - name: Ensure ssh is running
- service: name=ssh state=started
- when: with_ssh
|