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

add ansible and yaml lint #1

Merged
merged 5 commits into from
Aug 14, 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
4 changes: 4 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
skip_list:
- 'yaml'
- 'partial-become'
- 'no-changed-when'
28 changes: 28 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Lint
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: pip3 install yamllint

- name: Run Yaml Lint
run: |
yamllint .

- name: Run Ansible Lint
uses: ansible/ansible-lint@main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
7 changes: 7 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default

rules:
line-length:
max: 230
level: warning
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# handlers file for podman_play

- name: restart podman_play_app
- name: Restart podman_play_app
ansible.builtin.systemd:
name: "{{ podman_play_pod_name }}.service"
state: "restarted"
Expand Down
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
galaxy_info:
author: voidquark
description: Podman Play - Deploy Any App
Expand All @@ -10,4 +11,4 @@ galaxy_info:
platforms:
- name: EL
versions:
- "9"
- "9"
2 changes: 1 addition & 1 deletion tasks/directories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
mode: "0750"
owner: "{{ podman_play_user | default(ansible_user_id) }}"
group: "{{ podman_play_group | default(ansible_user_id) }}"
when: not __register_dir.stat.exists | bool
when: not __register_dir.stat.exists | bool
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
block:
- name: Create the app specific group
ansible.builtin.group:
name: "{{ podman_play_group }}"
name: "{{ podman_play_group }}"
system: false
state: present

Expand Down Expand Up @@ -89,7 +89,7 @@
quadlet_filename: "{{ podman_play_pod_name }}"
quadlet_options: "{{ podman_play_pod_quadlet_options | default(omit) }}"
username: "{{ podman_play_pod_username | default(omit) }}"
quiet: "{{ podman_play_pod_quiet | default(omit ) }}"
quiet: "{{ podman_play_pod_quiet | default(omit) }}"
recreate: "{{ podman_play_pod_recreate | default(omit) }}"
seccomp_profile_root: "{{ podman_play_pod_seccomp_profile_root | default(omit) }}"
state: "{{ podman_play_pod_state }}"
Expand Down