summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-docker/tasks/python2-docker.yml
blob: 9cb3b4830c00edaceece04b08c98a766b403573e (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
27
28
29
30
31
32
33
34
35
36
37
38
---
- name: Remove docker-python that is conflicting with python2-docker
  package:
    name: docker-python
    state: absent

- name: Create own-repo dir
  file:
    path: /root/own-repo
    state: directory

- name: Download python2-docker rpm for Ansible (docker_container module dep)
  get_url:
    url: https://cbs.centos.org/kojifiles/packages/python-docker/2.5.1/2.el7/noarch/python2-docker-2.5.1-2.el7.noarch.rpm
    dest: /root/own-repo/
  register: rpm

- name: Install createrepo
  package:
    name: createrepo
    state: present

- name: Run createrepo
  command: createrepo /root/own-repo/
  when: rpm.changed

- name: Create own-repo
  yum_repository:
    name: own-repo
    description: Own repo for ansible deps
    baseurl: file:///root/own-repo
    enabled: true
    gpgcheck: false

- name: Install docker python module
  package:
    name: python2-docker
    state: present