Skip to content

Commit

Permalink
fix: fixed cri-o service not being active after the installation (#6)
Browse files Browse the repository at this point in the history
* fix: fixed cri-o service not being active at the end of the role

* test: updated tests to check the real status of the cri-o service
  • Loading branch information
simplydreamy0 authored Jan 23, 2021
1 parent 810edd5 commit 8260474
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 6 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Start CRI-O service
service:
name: cri-o
state: started
become: true
10 changes: 3 additions & 7 deletions molecule/openstack-debian10/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
gather_facts: false
tasks:
- name: "Gather CRI-O service status"
systemd:
name: cri-o
state: started
register: crio_status
become: true
ansible.builtin.service_facts:

- name: "Make sure CRI-O is reloaded"
- name: "Make sure CRI-O is running"
assert:
that: crio_status.state == "started"
that: ansible_facts.services["cri-o.service"].state == "active"
2 changes: 1 addition & 1 deletion molecule/vagrant-virtualbox-debian10/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependency:
lint: |
set -e
yamllint -c .yamllint .
ansible-lint --exclude .travis.yml .
ansible-lint .
driver:
name: vagrant
provider:
Expand Down
10 changes: 3 additions & 7 deletions molecule/vagrant-virtualbox-debian10/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
gather_facts: false
tasks:
- name: "Gather CRI-O service status"
systemd:
name: cri-o
state: started
register: crio_status
become: true
ansible.builtin.service_facts:

- name: "Make sure CRI-O is reloaded"
- name: "Make sure CRI-O is running"
assert:
that: crio_status.state == "started"
that: ansible_facts.services["cri-o.service"].state == "active"
2 changes: 2 additions & 0 deletions tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
"{{ _cri_o_packages }}"
state: present
update_cache: yes
notify:
- "Start CRI-O service"

0 comments on commit 8260474

Please sign in to comment.