]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/sshd/tasks/main.yml
ansible-lint: Fix "Package installs should not use latest" warning
[AnsibleRoles.git] / roles / sshd / tasks / main.yml
index 684d88c377e2a504011a71cf891d0be702668af2..9a108d6051793dbf76bee633343948eca87519a6 100644 (file)
@@ -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'"