ssh.yml 413 B

12345678910111213141516
  1. - name: Install ssh packages
  2. apt: pkg={{ item }} state=installed update_cache=yes
  3. with_items:
  4. - openssh-server
  5. - openssh-client
  6. when: with_ssh
  7. - name: Install sshd configuration
  8. template: src=ssh/sshd_config.j2 dest=/etc/ssh/sshd_config owner=root group=root mode=0644
  9. notify:
  10. - Restart ssh
  11. when: with_ssh
  12. - name: Ensure ssh is running
  13. service: name=ssh state=started
  14. when: with_ssh