blob: 983e976684470a265bcda05b5e9460b3e5cc01e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
- name: Add Docker-CE repo
yum_repository:
name: docker-ce
description: Docker-ce YUM repo
baseurl: https://download.docker.com/linux/centos/7/x86_64/stable/
gpgcheck: true
gpgkey: https://download.docker.com/linux/centos/gpg
- name: Install createrepo
yum:
name: createrepo
state: present
- name: "Ensure {{ pkg_dir }} exists"
file:
path: "{{ pkg_dir }}"
state: directory
- name: Download rpm packages
command: "yumdownloader --destdir={{ pkg_dir }} --resolve {{ packages | join(' ') }}"
- name: Index repository
command: "createrepo {{ pkg_dir }}"
args:
creates: "{{ pkg_dir }}/repodata"
|