crio: ensure service is started and enabled (#6753)
This commit is contained in:
parent
6a4d322a7c
commit
99b8f0902e
1 changed files with 16 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: check if fedora coreos
|
- name: check if fedora coreos
|
||||||
stat:
|
stat:
|
||||||
path: /run/ostree-booted
|
path: /run/ostree-booted
|
||||||
|
@ -9,7 +8,6 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
is_ostree: "{{ ostree.stat.exists }}"
|
is_ostree: "{{ ostree.stat.exists }}"
|
||||||
|
|
||||||
|
|
||||||
- name: gather os specific variables
|
- name: gather os specific variables
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
|
@ -46,7 +44,6 @@
|
||||||
state: present
|
state: present
|
||||||
when: not is_ostree
|
when: not is_ostree
|
||||||
with_items: "{{ crio_packages }}"
|
with_items: "{{ crio_packages }}"
|
||||||
notify: restart crio
|
|
||||||
register: package_install
|
register: package_install
|
||||||
until: package_install is succeeded
|
until: package_install is succeeded
|
||||||
retries: 4
|
retries: 4
|
||||||
|
@ -99,6 +96,7 @@
|
||||||
template:
|
template:
|
||||||
src: crio.conf.j2
|
src: crio.conf.j2
|
||||||
dest: /etc/crio/crio.conf
|
dest: /etc/crio/crio.conf
|
||||||
|
notify: restart crio
|
||||||
|
|
||||||
- name: Copy mounts.conf
|
- name: Copy mounts.conf
|
||||||
copy:
|
copy:
|
||||||
|
@ -125,10 +123,24 @@
|
||||||
- ansible_distribution == "CentOS"
|
- ansible_distribution == "CentOS"
|
||||||
- ansible_distribution_major_version == "7"
|
- ansible_distribution_major_version == "7"
|
||||||
|
|
||||||
|
|
||||||
- name: Write cri-o proxy drop-in
|
- name: Write cri-o proxy drop-in
|
||||||
template:
|
template:
|
||||||
src: http-proxy.conf.j2
|
src: http-proxy.conf.j2
|
||||||
dest: /etc/systemd/system/crio.service.d/http-proxy.conf
|
dest: /etc/systemd/system/crio.service.d/http-proxy.conf
|
||||||
notify: restart crio
|
notify: restart crio
|
||||||
when: http_proxy is defined or https_proxy is defined
|
when: http_proxy is defined or https_proxy is defined
|
||||||
|
|
||||||
|
- name: Ensure crio service is started and enabled
|
||||||
|
service:
|
||||||
|
name: crio
|
||||||
|
daemon_reload: true
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
|
|
||||||
|
- name: Verify that crio is running
|
||||||
|
command: "crio-status info"
|
||||||
|
register: get_crio_info
|
||||||
|
until: get_crio_info is succeeded
|
||||||
|
changed_when: false
|
||||||
|
retries: 5
|
||||||
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
|
|
Loading…
Reference in a new issue