Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiline ansible_managed strings #22

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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