-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ansible lint fixes and workflows (#12)
# Pull Request Description - Added workflows (CI, Release Drafter, Ansible Galaxy Publish) - Fixed Ansible lint ## Change type - [X] Bug fix (non-breaking change which fixes a specific issue) - [ ] New feature (non-breaking change adding new functionality) - [ ] Breaking change (fix or feature that potentially causes existing functionality to fail) - [X] Change that does not affect Ansible Role code (Github Actions Workflow, Documentation, or similair)
- Loading branch information
1 parent
b282972
commit 42161da
Showing
13 changed files
with
233 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name-template: "$RESOLVED_VERSION" | ||
tag-template: "$RESOLVED_VERSION" | ||
categories: | ||
- title: "Breaking" | ||
lables: | ||
- "major" | ||
- "breaking" | ||
- title: "Features" | ||
labels: | ||
- "feature" | ||
- "enhancement" | ||
- title: "Bug Fixes" | ||
labels: | ||
- "bug" | ||
- "fix" | ||
- title: "Documentation" | ||
labels: | ||
- "documentation" | ||
- title: "Workflows" | ||
labels: | ||
- "workflow" | ||
version-resolver: | ||
major: | ||
labels: | ||
- "major" | ||
- "breaking" | ||
minor: | ||
labels: | ||
- "feature" | ||
- "enhancement" | ||
patch: | ||
labels: | ||
- "bug" | ||
- "fix" | ||
default: patch | ||
change-template: "- $TITLE, by @$AUTHOR (#$NUMBER)" | ||
template: | | ||
# Changes | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [opened, reopened, synchronize] | ||
|
||
|
||
jobs: | ||
yamllint: | ||
name: YAML Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4.2.0 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5.2.0 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install deps | ||
run: pip3 install yamllint | ||
|
||
- name: Lint code | ||
run: yamllint . | ||
|
||
ansiblelint: | ||
name: Ansible Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run ansible-lint | ||
uses: ansible/ansible-lint@main | ||
with: | ||
args: "--profile production" | ||
setup_python: "true" | ||
requirements_file: "./requirements.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Release Drafter | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
types: [opened, reopened, synchronize, labeled] | ||
|
||
jobs: | ||
draft_release: | ||
name: Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v6 | ||
with: | ||
config-name: release_drafter.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Release to Ansible Galaxy | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Ansible Galaxy Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: galaxy | ||
uses: robertdebock/galaxy-action@1.2.1 | ||
with: | ||
galaxy_api_key: ${{ secrets.galaxy_api_key }} | ||
git_branch: ${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
line-length: | ||
max: 170 | ||
level: warning | ||
comments: | ||
min-spaces-from-content: 1 | ||
comments-indentation: disable | ||
braces: | ||
max-spaces-inside: 1 | ||
octal-values: | ||
forbid-implicit-octal: true | ||
forbid-explicit-octal: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
### Azure AD App registration related variables ### | ||
# Azure AD App display name | ||
# az_app_display_name: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
collections: | ||
- name: azure.azcollection | ||
version: 2.4.0 | ||
type: galaxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
--- | ||
- name: get role definitions id | ||
- name: Get role definitions id | ||
azure.azcollection.azure_rm_roledefinition_info: | ||
role_name: "{{ item.name }}" | ||
scope: / | ||
register: az_rbac_role_definition | ||
|
||
- ansible.builtin.include_tasks: tasks/assign_rbac_roles.yml | ||
- name: Assign RBAC roles | ||
ansible.builtin.include_tasks: tasks/assign_rbac_roles.yml | ||
loop: "{{ item.scopes }}" | ||
loop_control: | ||
loop_var: scp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.