qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 2/4] Jobs based on custom runners: build environment docs


From: Cleber Rosa
Subject: Re: [PATCH v5 2/4] Jobs based on custom runners: build environment docs and playbook
Date: Tue, 23 Feb 2021 12:44:31 -0500

On Tue, Feb 23, 2021 at 03:01:50PM +0000, Alex Bennée wrote:
> 
> Alex Bennée <alex.bennee@linaro.org> writes:
> 
> > Cleber Rosa <crosa@redhat.com> writes:
> >
> >> To run basic jobs on custom runners, the environment needs to be
> >> properly set up.  The most common requirement is having the right
> >> packages installed.
> >>
> <snip>
> >
> > So I got somewhat there with a direct command line invocation:
> >
> >   ansible-playbook -u root -i 192.168.122.24,192.168.122.45 
> > scripts/ci/setup/build-environment.yml -e 
> > 'ansible_python_interpreter=/usr/bin/python3'
> >
> > although for some reason a single host -i fails...
> >
> >> diff --git a/scripts/ci/setup/build-environment.yml 
> >> b/scripts/ci/setup/build-environment.yml
> >> new file mode 100644
> >> index 0000000000..0197e0a48b
> >> --- /dev/null
> >> +++ b/scripts/ci/setup/build-environment.yml
> >> @@ -0,0 +1,76 @@
> >> +---
> >> +- name: Installation of basic packages to build QEMU
> >> +  hosts: all
> >> +  tasks:
> >> +    - name: Update apt cache
> >> +      apt:
> >> +        update_cache: yes
> >> +      when:
> >> +        - ansible_facts['distribution'] == 'Ubuntu'
> >
> > So are we limiting to Ubuntu here rather than say a Debian base?
> 
> Also I'm getting:
> 
>   TASK [Update apt cache] 
> *****************************************************************************************************************************************************
>   fatal: [hackbox-ubuntu-2004]: FAILED! => {"msg": "The conditional check 
> 'ansible_facts['distribution'] == 'Ubuntu'' failed. The error was: error 
> while evaluating conditional (ansible_facts['distribution'] == 'Ubuntu'): 
> 'dict object' has no attribute 'distribution'\n\nThe error appears to have 
> been in '/home/alex/lsrc/qemu.git/scripts/ci/setup/build-environment.yml': 
> line 5, column 7, but may\nbe elsewhere in the file depending on the exact 
> syntax problem.\n\nThe offending line appears to be:\n\n  tasks:\n    - name: 
> Update apt cache\n      ^ here\n"}
> 
> which is odd given that machine is definitely an Ubuntu one.
>

It's defintely odd.  This is what I get on a fresh machine:

   TASK [Update apt cache] 
*************************************************************************************************************************
   [WARNING]: Updating cache and auto-installing missing dependency: python3-apt
   ok: [localhost]

Could you please let me know the output of:

   $ ansible -m setup -u $YOUR_USERNAME -i $HOSTNAME, all | grep 
ansible_distribution

Thanks,
- Cleber.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]