Signed-off-by: Andrea Bolognani <abolo...@redhat.com>
---
 ansible/README.markdown        |  71 +++++++++++++
 ansible/mappings/commands.yml  |  77 ++++++++++++++
 ansible/mappings/libraries.yml | 228 +++++++++++++++++++++++++++++++++++++++++
 ansible/mappings/misc.yml      |  13 +++
 ansible/mappings/perl.yml      | 112 ++++++++++++++++++++
 ansible/mappings/python.yml    |  35 +++++++
 6 files changed, 536 insertions(+)
 create mode 100644 ansible/README.markdown
 create mode 100644 ansible/mappings/commands.yml
 create mode 100644 ansible/mappings/libraries.yml
 create mode 100644 ansible/mappings/misc.yml
 create mode 100644 ansible/mappings/perl.yml
 create mode 100644 ansible/mappings/python.yml

diff --git a/ansible/README.markdown b/ansible/README.markdown
new file mode 100644
index 0000000..9c704b3
--- /dev/null
+++ b/ansible/README.markdown
@@ -0,0 +1,71 @@
+Ansible playbooks for libvirt CI
+================================
+
+These can be used to turn a freshly installed machine into a worker for
+the Jenkins-based libvirt CI.
+
+There are two main playbooks:
+
+* `bootstrap.yml`, used to perform the bootstrapping phase, that is, getting
+  guests to the point where Ansible can manage them fully and prompting the
+  user for a password is no longer required;
+
+* `site.yml`, used for the remaining configuration steps.
+
+Although you can use the playbooks directly, it's much more convenient to
+call either `make bootstrap` or `make site` instead.
+
+Each guest only needs to be bootstrapped once; that said, both playbooks are
+idempotent so there's no harm in applying them over and over again.
+
+In addition to the usual Ansible stuff, the `mappings/` directory contains
+a bunch of files describing the relationships between the packages of various
+distributions. These files are not used by Ansible at all, and are included
+merely for documentation purposes.
+
+
+CI use
+------
+
+After you have reinstalled a Jenkins worker, run `make bootstrap` followed
+by `make site` and a reboot to get it ready for CI use. No further action
+should be necessary.
+
+Adding new workers will require tweaking the inventory and host variables,
+but it should be very easy to eg. use the Fedora 26 configuration to come
+up with a working Fedora 27 configuration.
+
+
+Development use
+---------------
+
+If you are a developer trying to reproduce a bug on some OS you don't have
+easy access to, you can use these playbooks to create a suitable test
+environment.
+
+Since the playbooks are intended mainly for CI use, you'll have to tweak them
+a bit first, including:
+
+* trimming down the `inventory` file to just the guest you're interested in;
+
+* removing any references to the `jenkins` pseudo-project from
+  `host_vars/$guest/main.yml`, along with any references to projects you're
+  not interested to (this will cut down on the number of packages installed)
+  and any references to `jenkins_secret`;
+
+* deleting `host_vars/$guest/vault.yml` altogether.
+
+After performing these tweaks, you should be able to just run `make bootstrap`
+followed by `make site` as usual.
+
+
+Playbooks development
+---------------------
+
+If you want to work on the playbooks themselves, you'll probably want to set
+`build` in `group_vars/all/main.yml` to `true` so that a build of each project
+will be attempted after setting up the environment: this will help make sure
+the worker is actually able of building the project successfully.
+
+Note that this can be pretty time consuming, so you'll want to comment out as
+many projects as possible in `host_vars/*/main.yml` to speed things up.
diff --git a/ansible/mappings/commands.yml b/ansible/mappings/commands.yml
new file mode 100644
index 0000000..b365a0a
--- /dev/null
+++ b/ansible/mappings/commands.yml
@@ -0,0 +1,77 @@
+---
+augeas:
+  - augeas       # CentOS, Fedora, FreeBSD
+  - augeas-tools # Debian, Ubuntu
+
+autopoint:
+  - autopoint     # Debian, Ubuntu
+  - gettext-devel # CentOS, Fedora
+  - gettext-tools # FreeBSD
+
+dnsmasq:
+  - dnsmasq      # CentOS, Fedora, FreeBSD
+  - dnsmasq-base # Debian, Ubuntu
+
+dtrace:
+  - systemtap-sdt-dev   # Debian, Ubuntu
+  - systemtap-sdt-devel # CentOS, Fedora
+
+go:
+  - go     # FreeBSD
+  - golang # CentOS, Debian, Fedora, Ubuntu
+
+gtkdocize:
+  - gtk-doc       # CentOS, Fedora, FreeBSD
+  - gtk-doc-tools # Debian, Ubuntu
+
+iscsiadm:
+  - iscsi-initiator-utils # CentOS, Fedora
+  - open-iscsi            # Debian, Ubuntu
+
+java:
+  - java-1.8.0-openjdk-headless # CentOS, Fedora
+  - openjdk-7-jre-headless      # Debian 8, Ubuntu <= 14
+  - openjdk-8-jre-headless      # Debian 9, Ubuntu 16
+  - openjdk8-jre                # FreeBSD
+
+libtool:
+  - libtool-bin # Debian, Ubuntu 16
+  - libtool     # CentOS, Fedora, FreeBSD, Ubuntu <= 14
+
+libtoolize:
+  - libtool
+
+make:
+  - gmake # FreeBSD
+  - make  # CentOS, Debian, Fedora, Ubuntu
+
+pkg-config:
+  - pkgconf   # Debian, FreeBSD, Ubuntu >= 14
+  - pkgconfig # CentOS, Fedora, Ubuntu 12
+
+qemu-img:
+  - qemu-img   # CentOS, Fedora
+  - qemu-utils # Debian, FreeBSD, Ubuntu
+
+scrub:
+  - diskscrub # FreeBSD
+  - scrub     # CentOS, Debian, Fedora Ubuntu
+
+showmount:
+  - nfs-common # Debian, Ubuntu
+  - nfs-utils  # CentOS, Fedora
+
+valac:
+  - vala  # CentOS, Fedora, FreeBSD
+  - valac # Debian, Ubuntu
+
+xmllint:
+  - libxml2       # CentOS, Fedora, FreeBSD
+  - libxml2-utils # Debian, Ubuntu
+
+xsltproc:
+  - libxslt  # CentOS, Fedora, FreeBSD
+  - xsltproc # Debian, Ubuntu
+
+zfs:
+  - zfs-fuse # CentOS, Debian, Fedora, Ubuntu
diff --git a/ansible/mappings/libraries.yml b/ansible/mappings/libraries.yml
new file mode 100644
index 0000000..e827fd3
--- /dev/null
+++ b/ansible/mappings/libraries.yml
@@ -0,0 +1,228 @@
+---
+avahi:
+  - avahi               # FreeBSD
+  - avahi-devel         # CentOS, Fedora
+  - libavahi-client-dev # Debian, Ubuntu
+
+check:
+  - check       # Debian, FreeBSD, Ubuntu
+  - check-devel # CentOS, Fedora
+
+cyrus-sasl:
+  - cyrus-sasl       # FreeBSD
+  - cyrus-sasl-devel # CentOS, Fedora
+  - libsasl2-dev     # Debian, Ubuntu
+
+device-mapper:
+  - device-mapper-devel # CentOS, Fedora
+  - libdevmapper-dev    # Debian, Ubuntu
+
+fuse:
+  - fuse-devel  # CentOS, Fedora
+  - fusefs-libs # FreeBSD
+  - libfuse-dev # Debian, Ubuntu
+
+glib2:
+  - glib           # FreeBSD
+  - glib2-devel    # CentOS, Fedora
+  - libglib2.0-dev # Debian, Ubuntu
+
+glibc6:
+  - glibc-devel # CentOS, Fedora
+  - libc6-dev   # Debian, Ubuntu
+
+glusterfs:
+  - glusterfs           # FreeBSD
+  - glusterfs-api-devel # CentOS, Fedora
+  - glusterfs-client    # Debian, Ubuntu
+
+gnutls:
+  - gnutls          # FreeBSD
+  - gnutls-devel    # CentOS, Fedora
+  - libgnutls-dev   # Ubuntu <= 14
+  - libgnutls28-dev # Debian, Ubuntu 16
+
+gobject-introspection:
+  - gobject-introspection       # FreeBSD
+  - gobject-introspection-devel # CentOS, Fedora
+  - libgirepository1.0-dev      # Debian, Ubuntu
+
+gtk-vnc2:
+  - gtk-vnc            # FreeBSD
+  - gtk-vnc2-devel     # CentOS, Fedora
+  - libgtk-vnc-2.0-dev # Debian, Ubuntu
+
+gtk3:
+  - gtk3         # FreeBSD
+  - gtk3-devel   # CentOS, Fedora
+  - libgtk-3-dev # Debian, Ubuntu
+
+libacl:
+  - libacl-devel # CentOS, Fedora
+  - libacl1-dev  # Debian, Ubuntu
+
+libattr:
+  - libattr-devel # CentOS, Fedora
+  - libattr1-dev  # Debian, Ubuntu
+
+libaudit:
+  - audit-libs-devel # CentOS, Fedora
+  - libaudit-dev     # Debian, Ubuntu
+
+libarchive:
+  - libarchive       # FreeBSD
+  - libarchive-dev   # Debian, Ubuntu
+  - libarchive-devel # CentOS, Fedora
+
+libblkid:
+  - libblkid-dev   # Debian, Ubuntu
+  - libblkid-devel # CentOS, Fedora
+
+libcap-ng:
+  - libcap-ng-dev   # Debian, Ubuntu
+  - libcap-ng-devel # CentOS, Fedora
+
+libcurl:
+  - curl                # FreeBSD
+  - libcurl-devel       # CentOS, Fedora
+  - libcurl4-gnutls-dev # Debian, Ubuntu
+
+libdbus:
+  - dbus          # FreeBSD
+  - dbus-devel    # CentOS, Fedora
+  - libdbus-1-dev # Debian, Ubuntu
+
+libgovirt:
+  - libgovirt-dev   # Debian, Ubuntu
+  - libgovirt-devel # Fedora
+
+libnl3:
+  - libnl-3-dev  # Debian, Ubuntu
+  - libnl3-devel # CentOS, Fedora
+
+libnlroute3:
+  - libnl-route-3-dev # Debian, Ubuntu
+  - libnl3-devel      # CentOS, Fedora
+
+libparted:
+  - libparted-dev # Debian, Ubuntu
+  - parted-devel  # CentOS, Fedora
+
+libpcap:
+  - libpcap       # FreeBSD
+  - libpcap-dev   # Debian, Ubuntu
+  - libpcap-devel # CentOS, Fedora
+
+libpciaccess:
+  - libpciaccess       # FreeBSD
+  - libpciaccess-dev   # Debian, Ubuntu
+  - libpciaccess-devel # CentOS, Fedora
+
+librbd:
+  - librbd-dev    # Debian, Ubuntu
+  - librbd-devel  # Fedora
+  - librbd1-devel # CentOS
+
+libselinux:
+  - libselinux-devel # CentOS, Fedora
+  - libselinux1-dev  # Debian, Ubuntu
+
+libsoup:
+  - libsoup        # FreeBSD
+  - libsoup-devel  # CentOS, Fedora
+  - libsoup2.4-dev # Debian, Ubuntu
+
+libssh:
+  - libssh            # FreeBSD
+  - libssh-devel      # CentOS, Fedora
+  - libssh-gcrypt-dev # Debian
+
+libssh2:
+  - libssh2       # FreeBSD
+  - libssh2-1-dev # Debian, Ubuntu
+  - libssh2-devel # CentOS, Fedora
+
+libudev:
+  - libudev-dev   # Debian, Ubuntu
+  - libudev-devel # CentOS, Fedora
+
+libvirt:
+  - libvirt       # FreeBSD
+  - libvirt-dev   # Debian, Ubuntu
+  - libvirt-devel # CentOS, Fedora
+
+libvirt-glib:
+  - libvirt-glib         # FreeBSD
+  - libvirt-glib-1.0-dev # Debian, Ubuntu
+  - libvirt-glib-devel   # CentOS, Fedora
+
+libvirt-gobject:
+  - libvirt-glib          # FreeBSD
+  - libvirt-glib-1.0-dev  # Debian, Ubuntu
+  - libvirt-gobject-devel # CentOS, Fedora
+
+libxml2:
+  - libxml2       # FreeBSD
+  - libxml2-devel # CentOS, Fedora
+  - libxml2-dev   # Debian, Ubuntu
+
+libxslt:
+  - libxslt       # FreeBSD
+  - libxslt-devel # CentOS, Fedora
+  - libxslt1-dev  # Debian, Ubuntu
+
+netcf:
+  - netcf-devel  # CentOS, Fedora
+  - libnetcf-dev # Debian, Ubuntu
+
+numactl:
+  - libnuma-dev   # Debian, Ubuntu
+  - numactl-devel # CentOS, Fedora
+
+openssl:
+  - libssl-dev    # Debian, Ubuntu
+  - openssl-devel # CentOS, Fedora
+
+openwsman:
+  - libopenwsman-dev # Ubuntu
+  - libwsman-devel   # CentOS, Fedora
+
+polkit:
+  - policykit-1  # Debian, Ubuntu
+  - polkit       # FreeBSD
+  - polkit-devel # CentOS, Fedora
+
+readline:
+  - libreadline-dev # Debian, Ubuntu
+  - readline        # FreeBSD
+  - readline-devel  # CentOS, Fedora
+
+sanlock:
+  - libsanlock-dev # Debian, Ubuntu
+  - sanlock-devel  # CentOS, Fedora
+
+spice-gtk3:
+  - libspice-client-gtk-3.0-dev # Debian, Ubuntu
+  - spice-gtk                   # FreeBSD
+  - spice-gtk3-devel            # CentOS, Fedora
+
+wireshark:
+  - wireshark-dev   # Debian, Ubuntu
+  - wireshark-devel # Fedora
+
+xen:
+  - libxen-dev # Debian, Ubuntu
+  - xen-devel  # Fedora
+
+xz:
+  - liblzma-dev # Debian, Ubuntu
+  - xz-devel    # CentOS, Fedora
+
+yajl:
+  - libyajl-dev # Debian, Ubuntu
+  - yajl        # FreeBSD
+  - yajl-devel  # CentOS, Fedora
+
+zlib:
+  - zlib1g-dev # Debian, Ubuntu
+  - zlib-devel # CentOS, Fedora
diff --git a/ansible/mappings/misc.yml b/ansible/mappings/misc.yml
new file mode 100644
index 0000000..4882b72
--- /dev/null
+++ b/ansible/mappings/misc.yml
@@ -0,0 +1,13 @@
+---
+test-screenshot:
+  - libvirt        # FreeBSD
+  - libvirt-daemon # Debian, Ubuntu
+  - libvirt-libs   # CentOS, Fedora
+
+pci-ids:
+  - hwdata # CentOS, Debian, Fedora, Ubuntu
+  - pciids # FreeBSD
+
+usb-ids:
+  - hwdata # CentOS, Debian, Fedora, Ubuntu
+  - usbids # FreeBSD
diff --git a/ansible/mappings/perl.yml b/ansible/mappings/perl.yml
new file mode 100644
index 0000000..97f799d
--- /dev/null
+++ b/ansible/mappings/perl.yml
@@ -0,0 +1,112 @@
+---
+accessors:
+  - libaccessors-perl # Debian, Ubuntu
+  - p5-accessors      # FreeBSD
+  - perl-accessors    # CentOS, Fedora
+
+Config::Record:
+  - libconfig-record-perl # Debian, Ubuntu
+  - p5-Config-Record      # FreeBSD
+  - perl-Config-Record    # CentOS, Fedora
+
+CPAN::Changes:
+  - libcpan-changes-perl # Debian, Ubuntu
+  - p5-CPAN-Changes      # FreeBSD
+  - perl-CPAN-Changes    # CentOS, Fedora
+
+Digest:
+  - libdigest-perl # Debian, Ubuntu
+  - p5-Digest      # FreeBSD
+  - perl-Digest    # CentOS, Fedora
+
+Digest::MD5:
+  - libdigest-perl-md5-perl # Debian, Ubuntu
+  - p5-Digest-MD5           # FreeBSD
+  - perl-Digest-MD5         # CentOS, Fedora
+
+ExtUtils::MakeMaker:
+  - p5-ExtUtils-MakeMaker   # FreeBSD
+  - perl-ExtUtils-MakeMaker # CentOS, Fedora
+
+File::Slurp:
+  - libfile-slurp-perl # Debian, Ubuntu
+  - p5-File-Slurp      # FreeBSD
+  - perl-File-Slurp    # CentOS, Fedora
+
+IO::Compress:Bzip2:
+  - libio-compress-perl    # Debian, Ubuntu
+  - p5-IO-Compress         # FreeBSD
+  - perl-IO-Compress-Bzip2 # CentOS, Fedora
+
+IO::String:
+  - libio-string-perl # Debian, Ubuntu
+  - p5-IO-String      # FreeBSD
+  - perl-IO-String    # CentOS, Fedora
+
+Module::Build:
+  - libmodule-build-perl # Debian, Ubuntu
+  - p5-Module-Build      # FreeBSD
+  - perl-Module-Build    # CentOS, Fedora
+
+Sub::Uplevel:
+  - libsub-uplevel-perl # Debian, Ubuntu
+  - p5-Sub-Uplevel      # FreeBSD
+  - perl-Sub-Uplevel    # CentOS, Fedora
+
+Sys::Virt:
+  - libsys-virt-perl # Debian, Ubuntu
+  - p5-Sys-Virt      # FreeBSD
+  - perl-Sys-Virt    # CentOS, Fedora
+
+TAP::Formatter::HTML:
+  - libtap-formatter-html-perl # Debian, Ubuntu
+  - perl-TAP-Formatter-HTML    # CentOS, Fedora
+
+TAP::Formatter::JUnit:
+  - libtap-formatter-junit-perl # Debian, Ubuntu
+  - p5-TAP-Formatter-JUnit      # FreeBSD
+  - perl-TAP-Formatter-JUnit    # CentOS, Fedora
+
+TAP::Harness::Archive:
+  - libtap-harness-archive-perl # Debian, Ubuntu
+  - perl-TAP-Harness-Archive    # CentOS, Fedora
+
+Test::Exception:
+  - libtest-exception-perl # Debian, Ubuntu
+  - p5-Test-Exception      # FreeBSD
+  - perl-Test-Exception    # CentOS, Fedora
+
+Test::LWP::UserAgent:
+  - libtest-lwp-useragent-perl # Debian, Ubuntu
+  - p5-Test-LWP-UserAgent      # FreeBSD
+  - perl-Test-LWP-UserAgent    # CentOS, Fedora
+
+Test::Pod:
+  - libtest-pod-perl # Debian, Ubuntu
+  - p5-Test-Pod      # FreeBSD
+  - perl-Test-Pod    # CentOS, Fedora
+
+Test::Pod::Coverage:
+  - libtest-pod-coverage-perl # Debian, Ubuntu
+  - p5-Test-Pod-Coverage      # FreeBSD
+  - perl-Test-Pod-Coverage    # CentOS, Fedora
+
+Time::HiRes:
+  - libtime-hr-perl # Debian, Ubuntu
+  - p5-Time-HiRes   # FreeBSD
+  - perl-Time-HiRes # CentOS, Fedora
+
+XML::Twig:
+  - libxml-twig-perl # Debian, Ubuntu
+  - p5-XML-Twig      # FreeBSD
+  - perl-XML-Twig    # CentOS, Fedora
+
+XML::Writer:
+  - libxml-writer-perl # Debian, Ubuntu
+  - p5-XML-Writer      # FreeBSD
+  - perl-XML-Writer    # CentOS, Fedora
+
+XML::XPath:
+  - libxml-xpath-perl # Debian, Ubuntu
+  - p5-XML-XPath      # FreeBSD
+  - perl-XML-XPath    # CentOS, Fedora
diff --git a/ansible/mappings/python.yml b/ansible/mappings/python.yml
new file mode 100644
index 0000000..e650db7
--- /dev/null
+++ b/ansible/mappings/python.yml
@@ -0,0 +1,35 @@
+---
+gi:
+  - py27-gobject3  # FreeBSD
+  - python-gi      # Debian, Ubuntu
+  - python-gobject # CentOS, Fedora
+
+ipaddr:
+  - py27-ipaddr   # FreeBSD
+  - python-ipaddr # CentOS, Debian, Fedora, Ubuntu
+
+libosinfo:
+  - gir1.2-libosinfo-1.0 # Debian, Ubuntu
+  - libosinfo            # CentOS, Fedora, FreeBSD
+
+libxml2:
+  - libxml2-python # Debian, Ubuntu
+  - py27-libxml2   # FreeBSD
+  - python-libxml2 # CentOS, Fedora
+
+lxml:
+  - py27-lxml   # FreeBSD
+  - python-lxml # CentOS, Debian, Fedora, Ubuntu
+
+nose:
+  - py27-nose   # FreeBSD
+  - python-nose # CentOS, Debian, Fedora, Ubuntu
+
+requests:
+  - py27-requests    # FreeBSD
+  - python-requests  # CentOS, Debian, Ubuntu
+  - python2-requests # Fedora
+
+libvirt:
+  - libvirt-python # CentOS, Debian, Fedora, Ubuntu
+  - py27-libvirt   # FreeBSD
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to