From: Alfredo Deza Date: Thu, 22 Oct 2015 15:06:12 +0000 (-0400) Subject: restart ssh depending on distro X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d2b3a1d06785cf5e58a11ca95e85967b0b44ba86;p=ceph-build.git restart ssh depending on distro Signed-off-by: Alfredo Deza --- diff --git a/ansible/init.yml b/ansible/init.yml index 922f7780..10399b10 100644 --- a/ansible/init.yml +++ b/ansible/init.yml @@ -6,7 +6,7 @@ # be publicly accessible. - hosts: all - user: centos + user: admin sudo: true tasks: @@ -44,5 +44,10 @@ # command: firewall-cmd --add-port 2222/tcp --permanent # Example action to start service httpd, if not running + - name: restart ssh + service: name=ssh state=restarted + when: ansible_pkg_mgr == "apt" + - name: restart sshd service: name=sshd state=restarted + when: ansible_pkg_mgr == "yum"