Rolle aktualisiert: ctop (#467)

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #467
This commit is contained in:
Michael Grote 2023-02-17 11:48:41 +01:00
parent 8d4acdeda6
commit 791b2adac5
22 changed files with 66 additions and 134 deletions

View file

@ -14,21 +14,21 @@ env:
jobs:
test:
name: Molecule test
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
ansible-version:
- '2.9.1'
- '2.10.7' # max-ansible-test-version
molecule-scenario:
- centos
- rocky
- debian_max
- debian_min
- ubuntu_max
- opensuse
- fedora
include:
- ansible-version: '2.8.16'
- ansible-version: '2.9.26' # min-ansible-test-version
molecule-scenario: ubuntu_min
env:
@ -41,7 +41,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.8'
- name: Cache Molecule
id: molecule-cache
@ -74,7 +74,7 @@ jobs:
test-all:
if: ${{ always() }}
name: Test (matrix)
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: test
steps:
- name: Check test matrix status

View file

@ -1,29 +1,12 @@
name: Release
on:
push:
tags:
- '*'
release:
types:
- published
jobs:
release:
name: Release
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install Ansible
run: pip3 install --no-compile ansible-base
- name: Trigger a new import on Galaxy
run: >-
ansible-galaxy role import
--api-key ${{ secrets.GALAXY_API_KEY }}
${GITHUB_REPOSITORY%%/*} ${GITHUB_REPOSITORY#*/}
uses: gantsign/workflows/.github/workflows/ansible-galaxy-import.yml@v1
secrets: inherit

View file

@ -1 +1 @@
2.9.1
2.10.7

View file

@ -1 +0,0 @@
4.3.1

View file

@ -1 +1 @@
3.8.4
4.0.1

View file

@ -1 +1 @@
3.0.8
3.1.5

View file

@ -1 +1 @@
3.6.7
3.8.10

View file

@ -1 +1 @@
1.25.0
1.26.3

View file

@ -12,7 +12,7 @@ a glance from your terminal.
Requirements
------------
* Ansible >= 2.8
* Ansible >= 2.9
* Linux Distribution
@ -20,29 +20,30 @@ Requirements
* Debian
* Jessie (8)
* Stretch (9)
* Buster (10)
* Bullseye (11)
* Ubuntu
* Xenial (16.04)
* Bionic (18.04)
* Focal (20.04)
* RedHat Family
* CentOS
* Rocky Linux
* 7
* 8
* Fedora
* 31
* 35
* SUSE Family
* openSUSE
* 15.1
* 15.3
* Note: other versions are likely to work but have not been tested.
@ -56,10 +57,10 @@ are shown below):
```yaml
# ctop version number
ctop_version: '0.7.6'
ctop_version: '0.7.7'
# SHA256 sum for the ctop redistributable
ctop_redis_sha256sum: 'c5f8da250ec733084fb3891f2f8d04a49ffd25e81af59079216f2e6bb35fd983'
ctop_redis_sha256sum: 'b78374734ebe3d14b6edee3d5512c911c250d7fa7f3f964cb00acd3bc5a02a09'
# Directory to store files downloaded for ctop
ctop_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"

View file

@ -1,9 +1,9 @@
---
# ctop version number
ctop_version: '0.7.6'
ctop_version: '0.7.7'
# SHA256 sum for the ctop redistributable
ctop_redis_sha256sum: 'c5f8da250ec733084fb3891f2f8d04a49ffd25e81af59079216f2e6bb35fd983'
ctop_redis_sha256sum: 'b78374734ebe3d14b6edee3d5512c911c250d7fa7f3f964cb00acd3bc5a02a09'
# Directory to store files downloaded for ctop
ctop_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"

View file

@ -5,25 +5,26 @@ galaxy_info:
description: Ansible role for downloading and installing ctop.
company: GantSign Ltd.
license: MIT
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Fedora
versions:
- 31
- 35
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- jessie
- stretch
- buster
- bullseye
- name: opensuse
versions:
- 15.1
- 15.3
galaxy_tags:
- ctop
- docker

View file

@ -13,8 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_debian_max
image: debian:9
dockerfile: ../default/Dockerfile.j2
image: debian:11
provisioner:
name: ansible

View file

@ -13,8 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_debian_min
image: debian:8
dockerfile: ../default/Dockerfile.j2
image: debian:9
provisioner:
name: ansible

View file

@ -13,7 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_default
image: ubuntu:18.04
image: ubuntu:20.04
provisioner:
name: ansible

View file

@ -13,8 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_fedora
image: fedora:31
dockerfile: ../default/Dockerfile.j2
image: fedora:35
provisioner:
name: ansible

View file

@ -13,8 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_opensuse
image: opensuse/leap:15.1
dockerfile: ../default/Dockerfile.j2
image: opensuse/leap:15.3
provisioner:
name: ansible

View file

@ -12,9 +12,8 @@ lint: |
flake8
platforms:
- name: ansible_role_ctop_centos
image: centos:7
dockerfile: ../default/Dockerfile.j2
- name: ansible_role_ctop_rocky
image: rockylinux/rockylinux:8
provisioner:
name: ansible

View file

@ -13,8 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_ubuntu_max
image: ubuntu:18.04
dockerfile: ../default/Dockerfile.j2
image: ubuntu:20.04
provisioner:
name: ansible

View file

@ -13,8 +13,7 @@ lint: |
platforms:
- name: ansible_role_ctop_ubuntu_min
image: ubuntu:16.04
dockerfile: ../default/Dockerfile.j2
image: ubuntu:18.04
provisioner:
name: ansible

View file

@ -28,12 +28,11 @@
set -e
WRAPPER_VERSION=1.1.0
WRAPPER_VERSION=1.2.0
VERSION_DIR='.moleculew'
PYTHON_VERSION_FILE="$VERSION_DIR/python_version"
ANSIBLE_VERSION_FILE="$VERSION_DIR/ansible_version"
DOCKER_LIB_VERSION_FILE="$VERSION_DIR/docker_lib_version"
MOLECULE_VERSION_FILE="$VERSION_DIR/molecule_version"
YAMLLINT_VERSION_FILE="$VERSION_DIR/yamllint_version"
ANSIBLE_LINT_VERSION_FILE="$VERSION_DIR/ansible_lint_version"
@ -44,7 +43,6 @@ BUILD_DEPENDENCIES_INSTALLLED=false
PYENV_INSTALLED=false
ANSIBLE_VERSION=''
DOCKER_LIB_VERSION=''
MOLECULE_VERSION=''
PYTHON_VERSION=''
YAMLLINT_VERSION=''
@ -183,7 +181,7 @@ docker_present() {
return
fi
if [[ $USE_SYSTEM_DEPENDENCIES == true ]]; then
echo 'Error: docker is not installed.' >&2
echo 'Error: Docker is not installed.' >&2
exit 1
fi
@ -238,22 +236,24 @@ virtualenv_presant() {
fi
}
install_rich() {
# Workaround breaking changes in rich 11 by installing version 10
local RICH_VERSION='10.16.2'
banner "Installing Rich $RICH_VERSION into virtualenv $VIRTUAL_ENV"
pip install "rich==$RICH_VERSION"
echo ''
}
install_ansible() {
banner "Installing Ansible $ANSIBLE_VERSION into virtualenv $VIRTUAL_ENV"
pip install "ansible==$ANSIBLE_VERSION"
echo ''
}
install_docker_lib() {
banner "Installing Python Docker $DOCKER_LIB_VERSION into virtualenv $VIRTUAL_ENV"
pip install "docker==$DOCKER_LIB_VERSION"
echo ''
}
install_molecule() {
banner "Installing Molecule $MOLECULE_VERSION into virtualenv $VIRTUAL_ENV"
pip install "molecule==$MOLECULE_VERSION"
pip install "molecule[docker]==$MOLECULE_VERSION"
echo ''
}
@ -323,7 +323,6 @@ wrapper_version() {
print_versions() {
echo "Python: $PYTHON_VERSION"
echo "Ansible: $ANSIBLE_VERSION"
echo "Python Docker library: $DOCKER_LIB_VERSION"
echo "Molecule: $MOLECULE_VERSION"
echo "YamlLint: $YAMLLINT_VERSION"
echo "Ansible Lint: $ANSIBLE_LINT_VERSION"
@ -347,7 +346,6 @@ wrapper_freeze() {
echo "$PYTHON_VERSION" > "$PYTHON_VERSION_FILE"
echo "$ANSIBLE_VERSION" > "$ANSIBLE_VERSION_FILE"
echo "$DOCKER_LIB_VERSION" > "$DOCKER_LIB_VERSION_FILE"
echo "$MOLECULE_VERSION" > "$MOLECULE_VERSION_FILE"
echo "$YAMLLINT_VERSION" > "$YAMLLINT_VERSION_FILE"
echo "$ANSIBLE_LINT_VERSION" > "$ANSIBLE_LINT_VERSION_FILE"
@ -368,9 +366,6 @@ wrapper_unfreeze() {
if [[ -f "$ANSIBLE_VERSION_FILE" ]]; then
rm --verbose "$ANSIBLE_VERSION_FILE"
fi
if [[ -f "$DOCKER_LIB_VERSION_FILE" ]]; then
rm --verbose "$DOCKER_LIB_VERSION_FILE"
fi
if [[ -f "$MOLECULE_VERSION_FILE" ]]; then
rm --verbose "$MOLECULE_VERSION_FILE"
fi
@ -397,7 +392,6 @@ wrapper_upgrade_versions() {
local CURRENT_PYTHON_VERSION="$PYTHON_VERSION"
local CURRENT_ANSIBLE_VERSION="$ANSIBLE_VERSION"
local CURRENT_DOCKER_LIB_VERSION="$DOCKER_LIB_VERSION"
local CURRENT_MOLECULE_VERSION="$MOLECULE_VERSION"
local CURRENT_YAMLLINT_VERSION="$YAMLLINT_VERSION"
local CURRENT_ANSIBLE_LINT_VERSION="$ANSIBLE_LINT_VERSION"
@ -406,7 +400,6 @@ wrapper_upgrade_versions() {
query_latest_python_version
query_latest_package_version ANSIBLE_VERSION ansible
query_latest_package_version DOCKER_LIB_VERSION docker
query_latest_package_version MOLECULE_VERSION molecule
query_latest_package_version YAMLLINT_VERSION yamllint
query_latest_package_version ANSIBLE_LINT_VERSION ansible-lint
@ -427,12 +420,6 @@ wrapper_upgrade_versions() {
echo "Ansible: $CURRENT_ANSIBLE_VERSION -> $ANSIBLE_VERSION"
fi
if [[ "$CURRENT_DOCKER_LIB_VERSION" == "$DOCKER_LIB_VERSION" ]]; then
echo "Python Docker library: $CURRENT_DOCKER_LIB_VERSION (no change)"
else
echo "Python Docker library: $CURRENT_DOCKER_LIB_VERSION -> $DOCKER_LIB_VERSION"
fi
if [[ "$CURRENT_MOLECULE_VERSION" == "$MOLECULE_VERSION" ]]; then
echo "Molecule: $CURRENT_MOLECULE_VERSION (no change)"
else
@ -478,8 +465,6 @@ Molecule Wrapper
Additional options:
--ansible VERSION Use the specified version of Ansible
--docker-lib VERSION Use the specified version of the Python Docker
library
--molecule VERSION Use the specified version of Molecule
--python VERSION Use the specified version of Python
--yamllint VERSION Use the specified version of YamlLint
@ -538,14 +523,9 @@ wrapper_options_ansible() {
query_package_versions 'ansible' '2.8'
}
wrapper_options_docker_lib() {
echo 'latest'
query_package_versions 'docker' '3.0'
}
wrapper_options_molecule() {
echo 'latest'
query_package_versions 'molecule' '3.0.6'
query_package_versions 'molecule' '3.1.5'
}
wrapper_options_python() {
@ -574,22 +554,22 @@ wrapper_options_python() {
wrapper_options_yamllint() {
echo 'latest'
query_package_versions 'yamllint' '1.24.2'
query_package_versions 'yamllint' '1.26.3'
}
wrapper_options_ansible_lint() {
echo 'latest'
query_package_versions 'ansible_lint' '4.2.0'
query_package_versions 'ansible_lint' '5.4.0'
}
wrapper_options_flake8() {
echo 'latest'
query_package_versions 'flake8' '3.8.3'
query_package_versions 'flake8' '4.0.1'
}
wrapper_options_testinfra() {
echo 'latest'
query_package_versions 'testinfra' '5.2.2'
query_package_versions 'testinfra' '5.3.1'
}
wrapper_options_scenario() {
@ -633,15 +613,6 @@ parse_args() {
ANSIBLE_VERSION="$1"
shift
;;
--docker-lib=*)
DOCKER_LIB_VERSION="${1#*=}"
shift
;;
--docker-lib)
shift
DOCKER_LIB_VERSION="$1"
shift
;;
--molecule=*)
MOLECULE_VERSION="${1#*=}"
shift
@ -730,9 +701,6 @@ detemine_versions() {
if [[ $ANSIBLE_VERSION == '' ]]; then
ANSIBLE_VERSION="$MOLECULEW_ANSIBLE"
fi
if [[ $DOCKER_LIB_VERSION == '' ]]; then
DOCKER_LIB_VERSION="$MOLECULEW_DOCKER_LIB"
fi
if [[ $MOLECULE_VERSION == '' ]]; then
MOLECULE_VERSION="$MOLECULEW_MOLECULE"
fi
@ -777,17 +745,6 @@ detemine_versions() {
query_latest_package_version ANSIBLE_VERSION ansible
fi
if [[ $DOCKER_LIB_VERSION == '' ]] || [[ $DOCKER_LIB_VERSION == 'default' ]]; then
if [[ -f $DOCKER_LIB_VERSION_FILE ]]; then
DOCKER_LIB_VERSION=$(<"$DOCKER_LIB_VERSION_FILE")
fi
if [[ $DOCKER_LIB_VERSION == '' ]]; then
query_latest_package_version DOCKER_LIB_VERSION docker
fi
elif [[ $DOCKER_LIB_VERSION == 'latest' ]]; then
query_latest_package_version DOCKER_LIB_VERSION docker
fi
if [[ $MOLECULE_VERSION == '' ]] || [[ $MOLECULE_VERSION == 'default' ]]; then
if [[ -f $MOLECULE_VERSION_FILE ]]; then
MOLECULE_VERSION=$(<$MOLECULE_VERSION_FILE)
@ -847,7 +804,7 @@ detemine_versions() {
activate_virtualenv() {
detemine_versions
MOLECULE_WRAPPER_ENV="$HOME/.moleculew/ml-${MOLECULE_VERSION}_an-${ANSIBLE_VERSION}_py-${PYTHON_VERSION}_dk-${DOCKER_LIB_VERSION}_yl-${YAMLLINT_VERSION}_al-${ANSIBLE_LINT_VERSION}_f8-${FLAKE8_VERSION}_ti-${TESTINFRA_VERSION}"
MOLECULE_WRAPPER_ENV="$HOME/.moleculew/ml-${MOLECULE_VERSION}_an-${ANSIBLE_VERSION}_py-${PYTHON_VERSION}_yl-${YAMLLINT_VERSION}_al-${ANSIBLE_LINT_VERSION}_f8-${FLAKE8_VERSION}_ti-${TESTINFRA_VERSION}"
if [ ! -f "$MOLECULE_WRAPPER_ENV/bin/activate" ]; then
@ -865,9 +822,10 @@ activate_virtualenv() {
source "$MOLECULE_WRAPPER_ENV/bin/activate"
echo ''
install_ansible
# Workaround breaking changes in rich 11 by installing version 10
install_rich
install_docker_lib
install_ansible
install_molecule
@ -902,9 +860,6 @@ case $MOLECULE_CMD in
wrapper-options-ansible)
wrapper_options_ansible
;;
wrapper-options-docker-lib)
wrapper_options_docker_lib
;;
wrapper-options-molecule)
wrapper_options_molecule
;;

View file

@ -6,7 +6,7 @@ ctop_install_dir: '/usr/local/bin'
ctop_install_path: '{{ ctop_install_dir }}/ctop'
# Mirror to download the ctop from
ctop_mirror: 'https://github.com/bcicen/ctop/releases/download/{{ ctop_version }}'
ctop_mirror: 'https://github.com/bcicen/ctop/releases/download/v{{ ctop_version }}'
# The OS of the ctop redistributable
ctop_os: 'linux'