integration-playbook: Add hidden dependencies

Previously, an internal playbook installed many extra
necessary/unnecessary packages before this playbook even started.  Since
this is a terrible design, move all dependencies here so that nothing is
unwritten.  This includes installing some deps. for ansible itself
(which must be done as a raw command).

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2017-09-19 19:57:11 -04:00
parent 29c4d890c8
commit e6b5fc7d53

View file

@ -3,10 +3,37 @@
## --skip-tags pr
- hosts: all
remote_user: root
gather_facts: False # Ansible dependencies need installing first
vars:
xunit: false
cni_commit: dcf7368eeab15e2affc6256f0bb1e84dd46a34de
pre_tasks:
# Assumes subscription stuff won't get in the way
- name: Install pre-requesites for ansible on all platforms
raw: $(type -P dnf || type -P yum) install -y python libselinux-python yum-utils python3-pycurl
# Gather facts
- setup:
# Just one more thing...
- name: Install special ansible deps. for fedora
raw: dnf install -y python2-dnf python3-dnf
when: ansible_distribution == 'Fedora'
tasks:
- name: Enable EPEL on RHEL & CentOS
yum_repository:
name: epel
description: "Extra Packages for Enterprise Linux"
baseurl: "http://dl.fedoraproject.org/pub/epel/7/$basearch"
metalink: "https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch"
gpgcheck: True
gpgcakey: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7Server"
when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS')
- name: import EPEL GPG keys on RHEL & CentOS
command: 'rpm --import {{ item }}'
with_items:
- https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7Server
- https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
- https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL
when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS')
- name: Update all packages
yum:
name: '*'
@ -27,28 +54,57 @@
name: "{{ item }}"
state: latest
with_items:
- wget
- git
- make
- gcc
- tar
- libseccomp-devel
- golang
- glib2-devel
- glibc-static
- container-selinux
- btrfs-progs-devel
- device-mapper-devel
- ostree-devel
- glibc-devel
- gpgme-devel
- libassuan-devel
- libgpg-error-devel
- pkgconfig
- container-selinux
- skopeo-containers
- oci-systemd-hook
- curl
- device-mapper-devel
- expect
- findutils
- gcc
- git
- glib2-devel
- glibc-devel
- glibc-static
- golang
- gpgme-devel
- hostname
- iproute
- iptables
- krb5-workstation
- libassuan-devel
- libffi-devel
- libgpg-error-devel
- libguestfs-tools
- libseccomp-devel
- libvirt-client
- libvirt-python
- libxml2-devel
- libxslt-devel
- make
- mlocate
- nfs-utils
- nmap-ncat
- npm
- oci-register-machine
- oci-systemd-hook
- oci-umount
- openssl
- openssl-devel
- ostree-devel
- pkgconfig
- python
- python2-boto
- python2-crypto
- python2-mock
- python-click
- python-devel
- python-virtualenv
- PyYAML
- redhat-rpm-config
- rpcbind
- rsync
- sed
- socat
async: 600
poll: 10
@ -58,6 +114,8 @@
name: "{{ item }}"
state: latest
with_items:
- nmap-ncat
- iptables
- wget
- git
- make
@ -264,6 +322,7 @@
regexp: 'export PATH=/usr/local/go/bin:$PATH'
state: present
when: ansible_distribution == 'Fedora' or ansible_distribution == 'RedHat'
# dest dir depends on skopeo-containers package
- name: Copy redhat sigstore file to test host
copy:
remote_src: yes