Skip to content

Commit fef18ce

Browse files
author
Alberto Murillo Silva
committed
Move os updates into install/os_updates.yml
Signed-off-by: Alberto Murillo Silva <[email protected]>
1 parent 2212785 commit fef18ce

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

cri-o.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- hosts: all
33
become: true
44
tasks:
5+
- include: install/os_updates.yml
56
- include: install/kubernetes.yml
67
- include: install/golang.yml
78

@@ -57,12 +58,6 @@
5758
- pkgconfig
5859
- json-glib-devel
5960
- skopeo-containers
60-
- name: Update all in Ubuntu
61-
apt:
62-
upgrade: dist
63-
update_cache: yes
64-
cache_valid_time: 86400 #One day
65-
when: ansible_distribution == 'Ubuntu'
6661
- name: Make sure we have all required packages on Ubuntu
6762
package:
6863
name: "{{ item }}"
@@ -100,14 +95,6 @@
10095
- /var/lib/etcd
10196
- /etc/cni/net.d
10297
- /etc/containers
103-
- name: update all in RHEL/CentOS
104-
yum: name=* state=latest
105-
when: ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS'
106-
- name: Update all packages on Fedora
107-
dnf:
108-
name: '*'
109-
state: latest
110-
when: ansible_distribution == 'Fedora'
11198
- name: clone runc
11299
git:
113100
repo: https://github.com/opencontainers/runc

install/os_updates.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
- name: Update all in Ubuntu
3+
apt:
4+
upgrade: dist
5+
update_cache: yes
6+
cache_valid_time: 86400 #One day
7+
when: ansible_distribution == 'Ubuntu'
8+
9+
- name: update all in RHEL/CentOS
10+
yum:
11+
name: '*'
12+
state: latest
13+
when: ansible_distribution in ['RedHat', 'CentOS']
14+
15+
- name: Update all packages on Fedora
16+
dnf:
17+
name: '*'
18+
state: latest
19+
when: ansible_distribution == 'Fedora'

0 commit comments

Comments
 (0)