diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index 00f12c7..3771a9b 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -10,14 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: 'checkout git repo' - uses: actions/checkout@v4.1.0 + - name: 'Checkout git repo' + uses: actions/checkout@v4.1.1 with: - lfs: true submodules: true fetch-depth: 0 - name: Run ansible-lint - uses: ansible-actions/ansible-lint-action@v0.0.3 + uses: ansible-actions/ansible-lint-action@v1.0.1 with: target: "./" diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 47b09bf..f8beb99 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -1,20 +1,24 @@ --- -name: Galaxy release +name: Galaxy-NG Roles Import # yamllint disable-line rule:truthy on: - push: - branches: ['main'] release: types: ['created'] jobs: build: + name: Galaxy Role Importer runs-on: ubuntu-latest + steps: - - name: checkout + - name: 'Checkout git repo' uses: actions/checkout@v4 - - name: galaxy - uses: robertdebock/galaxy-action@1.2.1 + with: + submodules: true + fetch-depth: 0 + + - name: 'Release on galaxy' + uses: ansible-actions/ansible-galaxy-action@v1.0.1 with: galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/.github/workflows/j2lint-check.yml b/.github/workflows/j2lint-check.yml new file mode 100644 index 0000000..3f74620 --- /dev/null +++ b/.github/workflows/j2lint-check.yml @@ -0,0 +1,22 @@ +--- +name: Jinja2 Linting check + +# yamllint disable-line rule:truthy +on: [push, pull_request] + +jobs: + build: + name: Jinja2 Linting + runs-on: ubuntu-latest + + steps: + - name: 'Checkout git repo' + uses: actions/checkout@v4.1.1 + with: + submodules: true + fetch-depth: 0 + + - name: Run j2lint + uses: ansible-actions/j2lint-action@v0.0.1 + with: + target: "./" diff --git a/.github/workflows/yamllint-check.yml b/.github/workflows/yamllint-check.yml new file mode 100644 index 0000000..48d9af2 --- /dev/null +++ b/.github/workflows/yamllint-check.yml @@ -0,0 +1,22 @@ +--- +name: Yamllint check + +# yamllint disable-line rule:truthy +on: [push, pull_request] + +jobs: + build: + name: Yamllint + runs-on: ubuntu-latest + + steps: + - name: 'Checkout git repo' + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Run yamllint + uses: ansible-actions/yamllint-action@v0.0.1 + with: + target: "./" diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml deleted file mode 100644 index 39c49f8..0000000 --- a/.github/workflows/yamllint.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: 'Yamllint GitHub Actions' - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - yamllint: - name: 'Yamllint' - runs-on: ubuntu-latest - steps: - - name: 'Checkout' - uses: actions/checkout@master - - name: 'Yamllint' - uses: karancode/yamllint-github-action@master - with: - yamllint_file_or_dir: '.' - yamllint_config_filepath: './.yamllint' - yamllint_strict: false - yamllint_comment: true -# env: -# GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN } diff --git a/templates/avahi.service.j2 b/templates/avahi.service.j2 index 785eb46..92cb232 100644 --- a/templates/avahi.service.j2 +++ b/templates/avahi.service.j2 @@ -2,11 +2,11 @@ - {%- if item.name is defined -%} - {{- item.name -}} - {%- else -%} - {{ item.service | upper }} server at %h - {%- endif -%} +{% if item.name is defined %} + {{ item.name }} +{% else %} + {{ item.service | upper }} server at %h +{% endif %} _{{ item.service | lower }}._{{ item.transport | default("tcp") | lower }}