Skip to content

Commit

Permalink
Merge pull request #22 from id-unibe-ch/19-fix-ansible_managed-string…
Browse files Browse the repository at this point in the history
…-in-templates

Support multiline ansible_managed strings
  • Loading branch information
mrolli authored Oct 21, 2024
2 parents a8308b5 + ff43364 commit e14af80
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ on:
- main

jobs:

lint:
name: Lint
runs-on: ubuntu-latest

steps:

- name: Checkout the codebase
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python 3
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install test dependencies.
run: pip3 install yamllint ansible-lint
Expand All @@ -37,27 +35,27 @@ jobs:
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy
strategy:
matrix:
distro: [rockylinux8, rockylinux9, ubuntu2004, ubuntu2204]
distro: [rockylinux9, ubuntu2004, ubuntu2204]
scenario: [default, local, remove-alias, uninstall]
include:
- playbook: converge.yml

steps:
- name: Checkout the codebase
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python 3
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install test dependencies.
run: pip3 install ansible molecule 'molecule-plugins[podman]' podman

- name: Run Molecule tests.
run: molecule test -s ${{ matrix.scenario }}
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_DISTRO: ${{ matrix.distro }}
MOLECULE_PLAYBOOK: ${{ matrix.playbook }}
2 changes: 1 addition & 1 deletion templates/configfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}

{% for param, value in __postfix_config_params.items() %}
{{ param }} = {{ value }}
Expand Down
2 changes: 1 addition & 1 deletion templates/main.cf-debian.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}
#
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

Expand Down
2 changes: 1 addition & 1 deletion templates/main.cf-redhat.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}
#
# Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter
Expand Down
2 changes: 1 addition & 1 deletion templates/mapfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}

{% for mapping in __postfix_mappings %}
{% for key, value in mapping.items() %}
Expand Down

0 comments on commit e14af80

Please sign in to comment.