From: Andrea Bolognani <abologna@redhat.com>
To: "Cleber Rosa" <crosa@redhat.com>,
qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>
Cc: "Fam Zheng" <fam@euphon.net>, "Thomas Huth" <thuth@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>,
"Erik Skultety" <eskultet@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Willian Rampazzo" <wrampazz@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>
Subject: Re: [PATCH v4 2/4] Jobs based on custom runners: build environment docs and playbook
Date: Tue, 20 Oct 2020 19:52:43 +0200 [thread overview]
Message-ID: <c0e7bd88bf64c0b22023810192fdb6e38d96fd97.camel@redhat.com> (raw)
In-Reply-To: <20201019015003.1527746-3-crosa@redhat.com>
On Sun, 2020-10-18 at 21:50 -0400, Cleber Rosa wrote:
> +++ b/scripts/ci/setup/build-environment.yml
> @@ -0,0 +1,233 @@
> +---
> +- name: Installation of basic packages to build QEMU
> + hosts: all
> + tasks:
My Ansible-fu is a bit rusty at the moment, so please double-check my
claims and apologies in advance for the ones that I will get wrong O:-)
> + - name: Install basic packages to build QEMU on Ubuntu 18.04/20.04
> + apt:
> + update_cache: yes
> + # Originally from tests/docker/dockerfiles/ubuntu1804.docker
> + pkg:
> + - ccache
> + - clang
Instead of using the 'apt' module here, and the equivalent module
further down, you could just do
package:
name:
- pkg1
- pkg2
...
state: present
every single time and let Ansible take care of the differences for
you.
> + when: "ansible_facts['distribution'] == 'Ubuntu'"
Quoting the entire condition is not necessary, you can just have
when: ansible_facts['distribution'] == 'Ubuntu'
or, my preference,
when:
- ansible_facts['distribution'] == 'Ubuntu'
which results in a nicer diff when you add/remove conditions.
> + - name: Install packages to build QEMU on Ubuntu 18.04/20.04 on non-s390x
> + apt:
> + update_cache: yes
> + pkg:
> + - libspice-server-dev
> + - libxen-dev
Indentation of list items is inconsistent here.
> + - name: Install basic packages to build QEMU on FreeBSD 12.x
> + pkgng:
> + # Originally from packages on .cirrus.yml under the freebsd_12_task
> + name: bash,curl,cyrus-sasl,git,glib,gmake,gnutls,gsed,nettle,ninja,perl5,pixman,pkgconf,png,usbredir
See above for 'pkgng' vs 'package', but at the very least this should
be
pkgng:
name:
- bash
- curl
...
or each time the list is touched the resulting diff is going to be
unmanageable.
> + - name: Enable PowerTools repo on CentOS 8
> + ini_file:
> + path: /etc/yum.repos.d/CentOS-PowerTools.repo
> + section: PowerTools
> + option: enabled
> + value: "1"
> + when:
> + - "ansible_facts['distribution'] == 'CentOS'"
> + - "ansible_facts['distribution_major_version'] == '8'"
Another option would be to use
command: 'dnf config-manager --set-enabled Stream-PowerTools -y'
args:
warn: no
but I have to admit the way you're doing it is very clever ;)
--
Andrea Bolognani / Red Hat / Virtualization
next prev parent reply other threads:[~2020-10-20 17:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 1:49 [PATCH v4 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI) Cleber Rosa
2020-10-19 1:50 ` [PATCH v4 1/4] Jobs based on custom runners: documentation and configuration placeholder Cleber Rosa
2020-10-21 6:45 ` Thomas Huth
2020-11-09 15:17 ` Cleber Rosa
2020-10-19 1:50 ` [PATCH v4 2/4] Jobs based on custom runners: build environment docs and playbook Cleber Rosa
2020-10-19 10:27 ` Erik Skultety
2020-10-19 20:25 ` Cleber Rosa
2020-10-20 6:18 ` Erik Skultety
2020-11-09 15:20 ` Cleber Rosa
2020-10-20 17:52 ` Andrea Bolognani [this message]
2020-11-09 16:37 ` Cleber Rosa
2020-11-10 17:27 ` Andrea Bolognani
2020-10-21 7:00 ` Thomas Huth
2020-11-09 16:39 ` Cleber Rosa
2020-10-19 1:50 ` [PATCH v4 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook Cleber Rosa
2020-10-19 10:26 ` Erik Skultety
2020-10-19 20:41 ` Cleber Rosa
2020-10-20 6:58 ` Erik Skultety
2020-10-20 8:29 ` Daniel P. Berrangé
2020-10-20 18:13 ` Andrea Bolognani
2020-10-19 20:54 ` Cleber Rosa
2020-10-20 7:00 ` Erik Skultety
2020-10-19 1:50 ` [PATCH v4 4/4] Jobs based on custom runners: add job definitions for QEMU's machines Cleber Rosa
2020-10-19 10:29 ` Daniel P. Berrangé
2020-10-19 10:42 ` Philippe Mathieu-Daudé
2020-10-19 20:17 ` Cleber Rosa
2021-01-28 11:51 ` [PATCH v4 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI) Thomas Huth
2021-02-03 21:06 ` Cleber Rosa
2021-02-04 11:27 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0e7bd88bf64c0b22023810192fdb6e38d96fd97.camel@redhat.com \
--to=abologna@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eskultet@redhat.com \
--cc=fam@euphon.net \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=wrampazz@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).