Separate RedHat specific vars for cri-o.
parent
d407a590a6
commit
c0dfa72707
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/rhel/secrets:/run/secrets
|
|
@ -1,21 +1,34 @@
|
||||||
---
|
---
|
||||||
|
- name: gather os specific variables
|
||||||
|
include_vars: "{{ item }}"
|
||||||
|
with_first_found:
|
||||||
|
- files:
|
||||||
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
|
||||||
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
|
||||||
|
- "{{ ansible_distribution|lower }}.yml"
|
||||||
|
- "{{ ansible_os_family|lower }}-{{ ansible_architecture }}.yml"
|
||||||
|
- "{{ ansible_os_family|lower }}.yml"
|
||||||
|
- defaults.yml
|
||||||
|
paths:
|
||||||
|
- ../vars
|
||||||
|
skip: true
|
||||||
|
tags:
|
||||||
|
- facts
|
||||||
|
|
||||||
- name: Add OpenShift Origin repository
|
- name: Add OpenShift Origin repository
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: origin
|
name: origin
|
||||||
description: OpenShift Origin Repo
|
description: OpenShift Origin Repo
|
||||||
baseurl: "{{ crio_rhel_repo_base_url }}"
|
baseurl: "{{ crio_rhel_repo_base_url }}"
|
||||||
gpgcheck: no
|
gpgcheck: no
|
||||||
when:
|
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
|
||||||
- ansible_os_family == 'RedHat'
|
|
||||||
|
|
||||||
- name: Install cri-o
|
- name: Install cri-o packages
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items: "{{ crio_packages }}"
|
||||||
- cri-o
|
|
||||||
- cri-tools
|
|
||||||
- oci-systemd-hook
|
|
||||||
|
|
||||||
- name: Install cri-o config
|
- name: Install cri-o config
|
||||||
template:
|
template:
|
||||||
|
@ -23,8 +36,11 @@
|
||||||
dest: /etc/crio/crio.conf
|
dest: /etc/crio/crio.conf
|
||||||
|
|
||||||
- name: Copy mounts.conf
|
- name: Copy mounts.conf
|
||||||
shell: |
|
copy:
|
||||||
cp -T /usr/share/containers/mounts.conf /etc/containers/mounts.conf
|
src: mounts.conf
|
||||||
|
dest: /etc/containers/mounts.conf
|
||||||
|
when:
|
||||||
|
- ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Create directory for oci hooks
|
- name: Create directory for oci hooks
|
||||||
file:
|
file:
|
||||||
|
@ -35,6 +51,6 @@
|
||||||
|
|
||||||
- name: Install cri-o service
|
- name: Install cri-o service
|
||||||
service:
|
service:
|
||||||
name: crio
|
name: "{{ crio_service }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
crio_packages:
|
||||||
|
- cri-o
|
||||||
|
- cri-tools
|
||||||
|
- oci-systemd-hook
|
||||||
|
|
||||||
|
crio_service: crio
|
Loading…
Reference in New Issue