Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/4.6.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Mar 10, 2021
2 parents 35ce367 + 2a5182c commit 17037ea
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 20 deletions.
32 changes: 25 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,41 @@
.script-bootstrap-libvirt: &script-bootstrap-libvirt
- |
if ! [[ -x "$(command -v kvm)" ]]; then
sudo apt-get update
sudo apt-get install -y binutils bridge-utils dnsmasq-base ebtables gcc libguestfs-tools libvirt-clients libvirt-daemon-system libvirt-dev make qemu-kvm qemu-utils ruby-dev
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y binutils bridge-utils dnsmasq-base ebtables gcc libguestfs-tools libvirt-clients libvirt-daemon-system libvirt-dev make qemu-kvm qemu-utils ruby-dev
vagrant plugin install vagrant-libvirt
fi
sudo systemctl start libvirtd.service
.script-bootstrap-ansible: &script-bootstrap-ansible
- |
if ! [[ -x "$(command -v ansible)" ]]; then
sudo apt-get update
sudo apt-get -y install ca-certificates curl gcc iproute2 pwgen python3 python3-dev sudo
curl -skL https://bootstrap.pypa.io/get-pip.py | sudo -H python3 - --prefix=/usr/local
sudo -H pip3 install --prefix=/usr/local --upgrade --requirement requirements.txt
export DEBIAN_FRONTEND=noninteractive
export PIPX_HOME=/usr/local/share/pipx
export PIPX_BIN_DIR=/usr/local/bin
sudo -E apt-get update
sudo -E apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
sudo -E pip3 install --prefix=/usr/local --upgrade pipx
sudo -E pipx install --force flake8
sudo -E pipx install --force yamllint
sudo -E pipx install --force --include-deps 'ansible>=2.10.3,<2.11.0'
sudo -E pipx inject --force --include-apps ansible ansible-lint
sudo -E pipx inject --force ansible docker netaddr openshift pyhon-vagrant
fi
.script-bootstrap-molecule: &script-bootstrap-molecule
- |
if ! [[ -x "$(command -v molecule)" ]]; then
export PIPX_HOME=/usr/local/share/pipx
export PIPX_BIN_DIR=/usr/local/bin
sudo -E pipx inject --force --include-apps ansible molecule
sudo -E pipx inject --force ansible molecule-docker molecule-vagrant
fi
.script-molecule-test: &script-molecule-test
- |
source ./scripts/run-tests.sh
export MOLECULE_INSTANCE_NAME=$(pwgen -1AB 12)
molecule test -s $_MOLECULE_SCENARIO_NAME
.script-ansible-galaxy-role-import: &script-ansible-galaxy-role-import
Expand All @@ -61,6 +78,7 @@
- *script-bootstrap-vagrant
- *script-bootstrap-libvirt
- *script-bootstrap-ansible
- *script-bootstrap-molecule
- *script-molecule-test

.job-ansible-galaxy: &job-ansible-galaxy
Expand Down
15 changes: 8 additions & 7 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
raw: |
set -eu
apt-get update
apt-get dist-upgrade -y
apt-get install -y python3 python3-dev
DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-dev
changed_when: false
ignore_errors: true

Expand Down Expand Up @@ -94,15 +94,15 @@
- name: debian | apt-get install *.deb
raw: |
set -eu
apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
DEBIAN_FRONTEND=noninteractive apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
when: ansible_os_family | lower == "debian"
changed_when: false
ignore_errors: true

- name: fedora-33 | yum install *.rpm
raw: |
set -eu
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
when: ansible_distribution | lower == "fedora" and ansible_distribution_major_version | lower == "33"
changed_when: false
ignore_errors: true
Expand All @@ -111,24 +111,25 @@
raw: |
set -eu
yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "8"
changed_when: false
ignore_errors: true

- name: redhat-7 | yum install *.rpm
raw: |
set -eu
subscription-manager repos --enable=rhel-7-server-optional-rpms || echo $?
yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-devel python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel python36-cryptography python3-jmespath sudo tar unzip xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python36-cryptography python3-devel python3-jmespath python3-libselinux python36-netaddr python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "7"
changed_when: false
ignore_errors: true

- name: suse | zypper -n install *.rpm
raw: |
set -eu
zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip
zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip
when: ansible_os_family | lower == "suse"
changed_when: false
ignore_errors: true
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ argcomplete
docker
flake8
jmespath
molecule>=3.2.0,<3.3.0
molecule
molecule-docker
molecule-podman
molecule-vagrant
netaddr
openshift
Expand Down
17 changes: 13 additions & 4 deletions scripts/bootstrap-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,37 @@ cd "$(cd "$(dirname "$0")"; pwd -P)/../"

# Prepare APT dependencies
if [ -x "$(command -v apt-get)" ]; then
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
fi

# Prepare YUM dependencies
if [ -x "$(command -v yum)" ]; then
yum makecache
yum update -y
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
fi

# Prepare Zypper dependencies
if [ -x "$(command -v zypper)" ]; then
zypper -n --gpg-auto-import-keys refresh
zypper -n update -y
zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip
zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip
fi

# Install PIP dependencies
pip3 install --prefix=/usr/local --upgrade pipx
PIPX_HOME=/usr/local/share/pipx PIPX_BIN_DIR=/usr/local/bin pipx install --include-deps --pip-args "--upgrade --requirement requirements.txt" ansible

# Install Ansible dependencies
export PIPX_HOME=/usr/local/share/pipx
export PIPX_BIN_DIR=/usr/local/bin
pipx install --force flake8
pipx install --force yamllint
pipx install --force --include-deps 'ansible>=2.10.3,<2.11.0'
pipx inject --force --include-apps ansible ansible-lint
pipx inject --force ansible docker netaddr openshift python-vagrant

# Install Ansible Collection dependencies
ansible-galaxy collection install --force --requirements-file ansible-galaxy-requirements.yml

0 comments on commit 17037ea

Please sign in to comment.