[stable-1] Update CI (#1790)

* Update CI (#1782)

* Update targets for CI for devel branch; move some targets to stable-2.10.

* Skipping test on RHEL 8.3 (it is already skipped on RHEL 8.2).

* Linting.

* Shut 2.9/2.10 pylint complaints up.

* More sanity.

* Bump CI to FreeBSD 11.4, 12.2. (#1657)

* Bump CI to FreeBSD 11.4, 12.2.

* Make FreeBSD Python package selection more future-proof.

(cherry picked from commit c1eb0a232c)

* Add macOS 11.1 tests (#1619)

* Add macOS 11.1 tests.

* Hopefully fix virtualenv.sh problems.

(cherry picked from commit 74174f11ff)

* Skip all postgresql tests on FreeBSD.

* Skip kubevirt inventory tests on macOS.
This commit is contained in:
Felix Fontein 2021-02-11 16:32:47 +01:00 committed by GitHub
commit 91acc44c34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 73 additions and 63 deletions

View file

@ -67,10 +67,10 @@ def list_groups(api):
members = []
if 'member_host' in hostgroup:
members = [host for host in hostgroup['member_host']]
members = list(hostgroup['member_host'])
if 'memberindirect_host' in hostgroup:
members += (host for host in hostgroup['memberindirect_host'])
inventory[hostgroup['cn'][0]] = {'hosts': [host for host in members]}
inventory[hostgroup['cn'][0]] = {'hosts': list(members)}
for member in members:
hostvars[member] = {}

View file

@ -326,8 +326,8 @@ class GceInventory(object):
If provided, this will be used to filter the results of the grouped_instances call'''
import csv
reader = csv.reader([os.environ.get('GCE_ZONE', "")], skipinitialspace=True)
zones = [r for r in reader]
return [z for z in zones[0]]
zones = list(reader)
return list(zones[0])
def parse_cli_args(self):
''' Command line argument processing '''

View file

@ -38,7 +38,7 @@ def build_dict():
for c in lxc.list_containers()])
# Extract the groups, flatten the list, and remove duplicates
groups = set(sum([g for g in containers.values()], []))
groups = set(sum(containers.values(), []))
# Create a dictionary for each group (including the 'all' group
return dict([(g, {'hosts': [k for k, v in containers.items() if g in v],