Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ansible-actions/ansible-lint-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.4
Choose a base ref
...
head repository: ansible-actions/ansible-lint-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Oct 20, 2023

  1. Copy the full SHA
    807c11f View commit details
  2. Merge pull request #4 from ansible-actions/docs

    change order and prepare for 1.0 release
    DO1JLR authored Oct 20, 2023
    Copy the full SHA
    f51a4ad View commit details
  3. Update README.md

    DO1JLR authored Oct 20, 2023
    Copy the full SHA
    07b0328 View commit details
  4. Merge pull request #5 from ansible-actions/DO1JLR-patch-1

    Update README.md
    DO1JLR authored Oct 20, 2023
    Copy the full SHA
    0bad2d4 View commit details
  5. update yamllint

    DO1JLR committed Oct 20, 2023
    Copy the full SHA
    604e77a View commit details
  6. Merge pull request #6 from ansible-actions/lint

    update yamllint
    DO1JLR authored Oct 20, 2023
    Copy the full SHA
    12b0558 View commit details
  7. Copy the full SHA
    e606080 View commit details
  8. Merge pull request #7 from ansible-actions/collections

    improve install collections from file
    DO1JLR authored Oct 20, 2023
    Copy the full SHA
    1ed99d3 View commit details

Commits on Oct 21, 2023

  1. Update ansible_docker.py

    DO1JLR authored Oct 21, 2023
    Copy the full SHA
    d74a921 View commit details
  2. Update action.yml

    DO1JLR authored Oct 21, 2023
    Copy the full SHA
    20a49b3 View commit details
  3. Merge pull request #8 from ansible-actions/DO1JLR-patch-1

    improve updating ansible roles
    DO1JLR authored Oct 21, 2023
    Copy the full SHA
    ec08106 View commit details

Commits on Oct 22, 2023

  1. Update README.md

    DO1JLR authored Oct 22, 2023
    Copy the full SHA
    a04a1d8 View commit details
  2. Merge pull request #9 from ansible-actions/DO1JLR-patch-1

    Update README.md
    DO1JLR authored Oct 22, 2023
    Copy the full SHA
    4024fa0 View commit details

Commits on Oct 23, 2023

  1. Update README.md

    DO1JLR authored Oct 23, 2023
    Copy the full SHA
    659ddd4 View commit details
  2. Merge pull request #10 from ansible-actions/DO1JLR-patch-1

    Update README.md
    DO1JLR authored Oct 23, 2023
    Copy the full SHA
    a255450 View commit details

Commits on Dec 6, 2023

  1. Bump actions/setup-python from 4.7.1 to 5.0.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 5.0.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4.7.1...v5.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 6, 2023
    Copy the full SHA
    36e05a5 View commit details

Commits on Mar 21, 2024

  1. Merge pull request #12 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.0.0
    
    Bump actions/setup-python from 4.7.1 to 5.0.0
    DO1JLR authored Mar 21, 2024
    Copy the full SHA
    23f0a4d View commit details
  2. Update README.md

    DO1JLR authored Mar 21, 2024
    Copy the full SHA
    88d941c View commit details
  3. Merge pull request #13 from ansible-actions/DO1JLR-patch-1

    Update README.md
    DO1JLR authored Mar 21, 2024
    Copy the full SHA
    2b94cc2 View commit details
  4. Bump ansible-actions/yamllint-action from 0.0.1 to 0.0.2

    Bumps [ansible-actions/yamllint-action](https://github.com/ansible-actions/yamllint-action) from 0.0.1 to 0.0.2.
    - [Release notes](https://github.com/ansible-actions/yamllint-action/releases)
    - [Commits](ansible-actions/yamllint-action@v0.0.1...v0.0.2)
    
    ---
    updated-dependencies:
    - dependency-name: ansible-actions/yamllint-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 21, 2024
    Copy the full SHA
    d591fd2 View commit details

Commits on Mar 22, 2024

  1. Merge pull request #14 from ansible-actions/dependabot/github_actions…

    …/ansible-actions/yamllint-action-0.0.2
    
    Bump ansible-actions/yamllint-action from 0.0.1 to 0.0.2
    DO1JLR authored Mar 22, 2024
    Copy the full SHA
    19b4df6 View commit details

Commits on Mar 26, 2024

  1. Bump actions/setup-python from 5.0.0 to 5.1.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.0.0...v5.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 26, 2024
    Copy the full SHA
    a9795b0 View commit details

Commits on Apr 23, 2024

  1. Merge pull request #15 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.1.0
    
    Bump actions/setup-python from 5.0.0 to 5.1.0
    DO1JLR authored Apr 23, 2024
    Copy the full SHA
    c2c15ca View commit details

Commits on Jul 10, 2024

  1. Bump actions/setup-python from 5.1.0 to 5.1.1

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.1.1.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.1.0...v5.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 10, 2024
    Copy the full SHA
    dc632db View commit details

Commits on Jul 11, 2024

  1. Merge pull request #16 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.1.1
    
    Bump actions/setup-python from 5.1.0 to 5.1.1
    DO1JLR authored Jul 11, 2024
    Copy the full SHA
    926b2f9 View commit details

Commits on Aug 29, 2024

  1. Bump actions/setup-python from 5.1.1 to 5.2.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.1 to 5.2.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.1.1...v5.2.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 29, 2024
    Copy the full SHA
    0cc90a5 View commit details

Commits on Aug 30, 2024

  1. Merge pull request #17 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.2.0
    
    Bump actions/setup-python from 5.1.1 to 5.2.0
    DO1JLR authored Aug 30, 2024
    Copy the full SHA
    c0fb5c3 View commit details

Commits on Oct 25, 2024

  1. Make sure TARGET is uppercase

    DO1JLR committed Oct 25, 2024
    Copy the full SHA
    1e98ead View commit details
  2. Merge pull request #19 from ansible-actions/target

    Make sure TARGET is uppercase
    DO1JLR authored Oct 25, 2024
    Copy the full SHA
    475d28d View commit details
  3. Bump actions/setup-python from 5.2.0 to 5.3.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.2.0 to 5.3.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.2.0...v5.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 25, 2024
    Copy the full SHA
    46e3d02 View commit details
  4. Merge pull request #18 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.3.0
    
    Bump actions/setup-python from 5.2.0 to 5.3.0
    DO1JLR authored Oct 25, 2024
    Copy the full SHA
    fe70590 View commit details

Commits on Jan 28, 2025

  1. Bump actions/setup-python from 5.3.0 to 5.4.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 5.4.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.3.0...v5.4.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 28, 2025
    Copy the full SHA
    638a942 View commit details

Commits on Jan 29, 2025

  1. Merge pull request #20 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.4.0
    
    Bump actions/setup-python from 5.3.0 to 5.4.0
    DO1JLR authored Jan 29, 2025
    Copy the full SHA
    af2ba56 View commit details

Commits on Mar 25, 2025

  1. Bump actions/setup-python from 5.4.0 to 5.5.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.4.0 to 5.5.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.4.0...v5.5.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 25, 2025
    Copy the full SHA
    5b3bfdf View commit details

Commits on Mar 26, 2025

  1. Merge pull request #21 from ansible-actions/dependabot/github_actions…

    …/actions/setup-python-5.5.0
    
    Bump actions/setup-python from 5.4.0 to 5.5.0
    DO1JLR authored Mar 26, 2025
    Copy the full SHA
    e390e8f View commit details
Showing with 53 additions and 53 deletions.
  1. +1 −1 .github/workflows/pylint.yml
  2. +22 −0 .github/workflows/yamllint-check.yml
  3. +0 −22 .github/workflows/yamllint.yml
  4. +1 −0 .gitignore
  5. +3 −4 README.md
  6. +2 −2 action.yml
  7. +24 −24 ansible_docker.py
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4.1.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ matrix.python-version }}

22 changes: 22 additions & 0 deletions .github/workflows/yamllint-check.yml
Original file line number Diff line number Diff line change
@@ -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.2
with:
target: "./"
22 changes: 0 additions & 22 deletions .github/workflows/yamllint.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ansible/
venv/
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Action Ansible Linting
========================

Linting ansible roles using the ansible-lint package directly from pypi.
Linting ansible roles or collections using the ansible-lint package directly from pypi.

Optionally it is possible to install some requirements like ansible collections, roles or pip packages. For more details about it, have a look at the Variables

@@ -21,15 +21,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: 'checkout git repo'
- name: Checkout git repo
uses: actions/checkout@v4
with:
lfs: true
submodules: true
fetch-depth: 0

- name: Run ansible-lint
uses: ansible-actions/ansible-lint-action@v0.0.4
uses: ansible-actions/ansible-lint-action@v1.0.3
with:
target: "./"
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@ inputs:
collections_yml:
description: |
Install multiple Collections, defined from requirements.yml file
They will be installed using ansible-galaxy collection install -r <YourInput> --upgrade.
They will be installed using ansible-galaxy collection install -r <YourInput> --force.
required: false
required_roles:
description: |
You can define a required ansible role here.
They will be installed using ansible-galaxy role install <YourInput> --upgrade.
They will be installed using ansible-galaxy role install <YourInput> --force.
required: false
python_dependency:
description: |
48 changes: 24 additions & 24 deletions ansible_docker.py
Original file line number Diff line number Diff line change
@@ -63,10 +63,10 @@ def run_command(self, command):
ENV_PIPPACKAGE_TXT_NAME = "PIPPACKAGETXT"
ENV_COLLECTIONS_YML_NAME = "COLLECTIONSYML"

# check for target variable
# check for TARGET variable
env_target = EnvironmentManager(ENV_TARGET_NAME)
target = env_target.check_required_environment_variable()
if target == "":
TARGET = env_target.check_required_environment_variable()
if TARGET == "":
print("Target needs to be defined")
sys.exit(1)

@@ -90,42 +90,42 @@ def run_command(self, command):
env_pip_txt = EnvironmentManager(ENV_PIPPACKAGE_TXT_NAME)
pip_pkg_txt = env_pip_txt.check_optional_environment_variable()

# run ansible commands
ansible_version_checker = AnsibleCommandExecution()
# execute ansible commands
execute = AnsibleCommandExecution()

# Optionally install required ansible collections directly
if bool(reqired_collection):
ansible_command = ["ansible-galaxy", "collection", "install",
collection_install_command = ["ansible-galaxy", "collection", "install",
f"{reqired_collection}", "--upgrade"]
version_info = ansible_version_checker.run_command(ansible_command)
print(f"COLLECTION INSTALL SUCCESSFUL\n{version_info}")
collection_install_info = execute.run_command(collection_install_command)
print(f"{collection_install_info}\nSINGLE COLLECTION INSTALL SUCCESSFUL")

# Optionally install required ansible collections from yml file
if bool(reqired_collection_yml):
ansible_command = ["ansible-galaxy", "collection", "install", "-r",
f"{reqired_collection_yml}", "--upgrade"]
version_info = ansible_version_checker.run_command(ansible_command)
print(f"COLLECTION.YML INSTALL SUCCESSFUL\n{version_info}")
collections_install_command = ["ansible-galaxy", "install", "--role-file",
f"{reqired_collection_yml}", "--force"]
collections_install_info = execute.run_command(collections_install_command)
print(f"{collections_install_info}\nCOLLECTION.YML INSTALL SUCCESSFUL")

# Optionally install required ansible roles
if bool(reqired_role):
ansible_command = ["ansible-galaxy", "role", "install", f"{reqired_role}", "--upgrade"]
version_info = ansible_version_checker.run_command(ansible_command)
print(f"ROLE INSTALL SUCCESSFUL\n{version_info}")
role_install_command = ["ansible-galaxy", "role", "install", f"{reqired_role}", "--force"]
role_install_info = execute.run_command(role_install_command)
print(f"{role_install_info}\nSINGLE ROLE INSTALL SUCCESSFUL")

# Optionally install pip package directly
if bool(pip_pkg):
ansible_command = ["pip", "install", "--upgrade", f"{pip_pkg}"]
version_info = ansible_version_checker.run_command(ansible_command)
print(f"PIP PACKAGE INSTALL SUCCESSFUL\n{version_info}")
pip_install_command = ["pip", "install", "--upgrade", f"{pip_pkg}"]
pip_install_info = execute.run_command(pip_install_command)
print(f"{pip_install_info}\nPIP PACKAGE INSTALL SUCCESSFUL")

# Optionally install pip package from file
if bool(pip_pkg_txt):
ansible_command = ["pip", "install", "--upgrade", "-r", f"{pip_pkg_txt}"]
version_info = ansible_version_checker.run_command(ansible_command)
print(f"PIP PACKAGE.TXT INSTALL SUCCESSFUL\n{version_info}")
pip_requirements_command = ["pip", "install", "--upgrade", "-r", f"{pip_pkg_txt}"]
pip_requirements_info = execute.run_command(pip_requirements_command)
print(f"{pip_requirements_info}\nPIP PACKAGE.TXT INSTALL SUCCESSFUL")

# run ansible lint
ansible_command = ["ansible-lint", f"{target}"]
linter_run = ansible_version_checker.run_command(ansible_command)
print(f"{linter_run}\n\nAnsible run successful")
ansible_command = ["ansible-lint", f"{TARGET}"]
linter_run = execute.run_command(ansible_command)
print(f"---start+linter---\n{linter_run}\nAnsible run successful\n---end+linter---")