| --- |
| # rke2 molecule/default/verify.yml |
| # |
| # SPDX-FileCopyrightText: © 2022 Open Networking Foundation <support@opennetworking.org> |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| - name: Verify |
| hosts: all |
| become: true |
| tasks: |
| - name: Gather service facts |
| service_facts: |
| - name: Verify docker is uninstalled |
| assert: |
| that: "'{{ item }}' not in ansible_facts.services" |
| with_items: |
| - docker.service |
| |
| - name: Check directories exists |
| stat: |
| path: "{{ item }}" |
| register: directories_stats |
| with_items: |
| - /etc/ceph |
| - /etc/cni |
| - /etc/kubernetes |
| - /opt/cni |
| - /opt/rke |
| - /run/secrets/kubernetes.io |
| - /run/calico |
| - /run/flannel |
| - /var/lib/calico |
| - /var/lib/etcd |
| - /var/lib/cni |
| - /var/lib/kubelet |
| - /var/lib/rancher/rke/log |
| - /var/log/containers |
| - /var/log/pods |
| - /var/run/calico |
| |
| - name: Directories status |
| assert: |
| that: "not item.stat.exists" |
| with_items: "{{ directories_stats.results }}" |
| loop: |
| - "{{ directories_stats.results }}" |