Samuli Silvius | bf6776c | 2019-03-25 18:46:24 +0200 | [diff] [blame^] | 1 | --- |
| 2 | - name: Remove docker-python that is conflicting with python2-docker |
| 3 | package: |
| 4 | name: docker-python |
| 5 | state: absent |
| 6 | |
| 7 | - name: Create own-repo dir |
| 8 | file: |
| 9 | path: /root/own-repo |
| 10 | state: directory |
| 11 | |
| 12 | - name: Download python2-docker rpm for Ansible (docker_container module dep) |
| 13 | get_url: |
| 14 | url: https://cbs.centos.org/kojifiles/packages/python-docker/2.5.1/2.el7/noarch/python2-docker-2.5.1-2.el7.noarch.rpm |
| 15 | dest: /root/own-repo/ |
| 16 | register: rpm |
| 17 | |
| 18 | - name: Install createrepo |
| 19 | package: |
| 20 | name: createrepo |
| 21 | state: present |
| 22 | |
| 23 | - name: Run createrepo |
| 24 | command: createrepo /root/own-repo/ |
| 25 | when: rpm.changed |
| 26 | |
| 27 | - name: Create own-repo |
| 28 | yum_repository: |
| 29 | name: own-repo |
| 30 | description: Own repo for ansible deps |
| 31 | baseurl: file:///root/own-repo |
| 32 | enabled: true |
| 33 | gpgcheck: false |
| 34 | |
| 35 | - name: Install docker python module |
| 36 | package: |
| 37 | name: python2-docker |
| 38 | state: present |