diff --git a/molecule-requirements.txt b/molecule-requirements.txt index d7d403ba8..a81d2496c 100644 --- a/molecule-requirements.txt +++ b/molecule-requirements.txt @@ -8,6 +8,7 @@ pytest-html pytest-xdist mock molecule>=2.22rc1 +netaddr # this is required for the docs build jobs sphinx diff --git a/tripleo_ansible/roles/tripleo-container-stop/tasks/tripleo_container_stop.yaml b/tripleo_ansible/roles/tripleo-container-stop/tasks/tripleo_container_stop.yaml index 1e7b8214f..b79c9de0e 100644 --- a/tripleo_ansible/roles/tripleo-container-stop/tasks/tripleo_container_stop.yaml +++ b/tripleo_ansible/roles/tripleo-container-stop/tasks/tripleo_container_stop.yaml @@ -1,14 +1,18 @@ --- - name: Make sure the container {{ container }} is stopped even if container_cli do not match become: true - shell: | + shell: |- # We need to make sure that containers are stopped # as we might have different CLIs to interact with # them. I.e the container_cli might be setted to be podman # but we might have the containers running with docker. set -eu if command -v podman && podman exec {{ container }} /bin/true; then - systemctl stop tripleo_{{ container }}.service + if systemctl status {{ container }}.service; then + systemctl stop {{ container }}.service + else + podman kill {{ container }} + fi fi if type docker &> /dev/null && docker exec {{ container }} /bin/true; then docker stop {{ container }} diff --git a/tripleo_ansible/roles/tripleo-ptp/molecule/ntp_stop/molecule.yml b/tripleo_ansible/roles/tripleo-ptp/molecule/ntp_stop/molecule.yml index a750b2b65..4bf9e2613 100644 --- a/tripleo_ansible/roles/tripleo-ptp/molecule/ntp_stop/molecule.yml +++ b/tripleo_ansible/roles/tripleo-ptp/molecule/ntp_stop/molecule.yml @@ -9,7 +9,7 @@ platforms: hostname: centos7 image: centos:7 dockerfile: Dockerfile - pkg_extras: python-setuptools ntp + pkg_extras: python-setuptools ntp cronie rsyslog easy_install: - pip environment: &env @@ -29,7 +29,7 @@ platforms: hostname: fedora28 image: fedora:28 dockerfile: Dockerfile - pkg_extras: python*-setuptools ntp + pkg_extras: python*-setuptools ntp cronie rsyslog environment: http_proxy: "{{ lookup('env', 'http_proxy') }}" https_proxy: "{{ lookup('env', 'https_proxy') }}"