Skip to content

Instantly share code, notes, and snippets.

@hemanth22
Last active April 8, 2021 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hemanth22/3aa853000459252a162e2bb3bf7d51d9 to your computer and use it in GitHub Desktop.
Save hemanth22/3aa853000459252a162e2bb3bf7d51d9 to your computer and use it in GitHub Desktop.
crio installer
---
- hosts: localhost
become: true
gather_facts: true
tasks:
- name: Install pip on the servers
yum:
name: python-pip
state: latest
update_cache: true
become: true
- name: Install pip3 on the servers
yum:
name: python3-pip
state: latest
become: true
- name: Ensure ansible is installed on servers
pip:
name: ansible
- name: Configuring libcontainers repo
shell: curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo
vars:
OS: CentOS_7
VERSION: 1.17:1.17.3
environment:
OS: "{{ OS }}"
VERSION: "{{ VERSION }}"
- name: Configuring crio repo
shell: curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo
vars:
OS: CentOS_7
VERSION: 1.17:1.17.3
environment:
OS: "{{ OS }}"
VERSION: "{{ VERSION }}"
- name: Install crio on the servers
yum:
name: cri-o
state: present
---
- hosts: localhost
become: true
gather_facts: true
tasks:
- name: Install pip on the servers
yum:
name: python-pip
state: latest
update_cache: true
become: true
- name: Install pip3 on the servers
yum:
name: python3-pip
state: latest
become: true
- name: Ensure ansible is installed on servers
pip:
name: ansible
- name: Configuring libcontainers repo
shell: curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo
vars:
OS: CentOS_7
VERSION: 1.20:1.20.0
environment:
OS: "{{ OS }}"
VERSION: "{{ VERSION }}"
- name: Configuring crio repo
shell: curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo
vars:
OS: CentOS_7
VERSION: 1.20:1.20.0
environment:
OS: "{{ OS }}"
VERSION: "{{ VERSION }}"
- name: Install crio on the servers
yum:
name: cri-o
state: present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment