Skip to content

docs: update readme, list supported ansible versions #37

docs: update readme, list supported ansible versions

docs: update readme, list supported ansible versions #37

Workflow file for this run

---
name: CI
"on":
push:
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
env:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_FORCE_COLOR: "1"
PY_COLORS: "1"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install openssh
run: |
sudo apt update
sudo apt install -y openssh-server openssh-client
- name: Generate openssh key and trust it
run: |
mkdir ~/.ssh
chmod 0700 ~/.ssh
ssh-keygen -f ~/.ssh/id_rsa </dev/null
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/*
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.3.2
poetry install
- name: Run local tests
run: poetry run molecule converge
- name: Create directory for clean build
run: mkdir -p ansible_collections/serverscom/mitogen
- name: Copy production files
run: cp -r README.md plugins meta galaxy.yml --target-directory=ansible_collections/serverscom/mitogen
- name: Packaging
run: poetry run ansible-galaxy collection build
working-directory: ansible_collections/serverscom/mitogen
- name: Extract version
id: version
run: |
version=$(grep ^version galaxy.yml|awk '{print $2}')
echo "::set-output name=version::$version"
- name: Try to install collection
run: poetry run ansible-galaxy collection install serverscom-mitogen-${{ steps.version.outputs.version }}.tar.gz
working-directory: ansible_collections/serverscom/mitogen
- name: Run with strategy stanza in play
run: poetry run ansible-playbook -i inventory.yaml test1.yaml
working-directory: integration_tests
- name: Run with strategy in environment variable
run: poetry run ansible-playbook -i inventory.yaml test1.yaml -vvv|grep ansible_mitogen.connection >/dev/null
working-directory: integration_tests
env:
ANSIBLE_STRATEGY: psvmcc.mitogen.mitogen_linear
- name: Publish on Galaxy
if: ${{ endsWith(github.ref, steps.version.outputs.version) }}
run:
poetry run ansible-galaxy collection publish
serverscom-mitogen-${{ steps.version.outputs.version }}.tar.gz
--api-key="${{ secrets.GALAXY_API_TOKEN }}"
working-directory: ansible_collections/serverscom/mitogen