X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=roles%2Fsshd%2Ftasks%2Fmain.yml;h=9a108d6051793dbf76bee633343948eca87519a6;hb=f6b53620824ebead4dbb49fa672b59719f028df1;hp=684d88c377e2a504011a71cf891d0be702668af2;hpb=88a34a4302b026cf22e38b9c8d6080b4a9e6cc1f;p=AnsibleRoles.git diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index 684d88c..9a108d6 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -6,29 +6,29 @@ - packages - sshd apt: > - state=latest + state=present name={{ item }} with_items: - openssh-blacklist-extra - ssh - when: "ansible_distribution == 'Debian'" + when: "ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'" -- name: ensure service "ssh" is enabled and running +- name: ensure service "ssh" is enabled and started tags: - services - sshd service: > enabled=yes name=ssh - state=running - when: "ansible_distribution == 'Debian'" + state=started + when: "ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'" -- name: ensure service "sshd" is enabled and running +- name: ensure service "sshd" is enabled and started tags: - services - sshd service: > enabled=yes name=sshd - state=running - when: "ansible_distribution != 'Debian'" + state=started + when: "ansible_distribution != 'Debian' and ansible_distribution != 'Ubuntu'"