Skip to content

Commit

Permalink
fix fqdn
Browse files Browse the repository at this point in the history
  • Loading branch information
bodsch committed Jul 12, 2024
1 parent c24bc0a commit 0885c36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 58 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/fqdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,64 +48,6 @@ env:
ANSIBLE_FORCE_COLOR: '1'

jobs:
arch:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
image:
- archlinux:latest
- artixlinux:latest
ansible-version:
- '8.5'
python_version:
- "3.10"
- "3.11"
scenario:
- default
collection_role:
- fqdn

steps:
- name: check out the codebase.
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: 🐍 set up python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python_version }}"

- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: force reinstall of community.docker
run: |
mkdir -p /home/runner/.ansible/collections
ansible-galaxy collection install community.docker --force
- name: Install collection
run: |
make \
install
- name: test ${{ matrix.collection_role }} - ${{ matrix.scenario }}
run: |
make \
test \
-e TOX_ANSIBLE="ansible_${{ matrix.ansible-version }}" \
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}

debian:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-20.04
Expand Down
11 changes: 11 additions & 0 deletions roles/fqdn/molecule/configured/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,14 @@ def get_vars(host):
result = templar.template(ansible_vars, fail_on_undefined=False)

return result


def test_files(host):
"""
"""
files = []
files.append("/etc/hostname")

for _file in files:
f = host.file(_file)
assert f.is_file

0 comments on commit 0885c36

Please sign in to comment.