Don't fail without package manager

Atomic Host uses unsupported package manager `rpm-ostree`. So, `ansible_pkg_mgr` is `unknown` and this task will fail. `sshd` is already in base system images. Apart from this, sshd configuration is standard for Fedora/CentOS.

I'm not sure it's the right solution. May be it's better to create new boolean variable like `sshd_manage_install` and use it here in `when`.
This commit is contained in:
Sergey Korolev 2016-12-22 16:48:27 +03:00 committed by GitHub
parent 273a962ef7
commit 6d0d043bab

View file

@ -22,6 +22,7 @@
name="{{ item }}"
state=installed
with_items: "{{ sshd_packages }}"
when: ansible_pkg_mgr != 'unknown'
tags:
- sshd