Skip to content

Commit

Permalink
Merge pull request #8 from roles-ansible/lint
Browse files Browse the repository at this point in the history
Cleanup + Linting + versionscheck
  • Loading branch information
DO1JLR authored Oct 27, 2023
2 parents 8623728 + 21015e0 commit aee79b1
Show file tree
Hide file tree
Showing 14 changed files with 414 additions and 147 deletions.
20 changes: 20 additions & 0 deletions .github/.galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Galaxy release

# yamllint disable-line rule:truthy
on:
push:
branches: ['main']
release:
types: ['created']

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: galaxy
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
59 changes: 59 additions & 0 deletions .github/galaxy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 217 additions & 0 deletions .github/license.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions .github/workflows/ansible-linting-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

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

- name: Run ansible-lint
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +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 git repo'
- name: 'Checkout git repo'
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: 'release on galaxy'
uses: robertdebock/galaxy-action@1.2.1
- name: 'Release on galaxy'
uses: ansible-actions/ansible-galaxy-action@v1.1.1
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: 'main'
22 changes: 22 additions & 0 deletions .github/workflows/j2lint-check.yml
Original file line number Diff line number Diff line change
@@ -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
with:
submodules: true
fetch-depth: 0

- name: Run j2lint
uses: ansible-actions/[email protected]
with:
target: "./"
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/[email protected]
with:
target: "./"
23 changes: 0 additions & 23 deletions .github/workflows/yamllint.yaml

This file was deleted.

12 changes: 8 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
---
- name: Show Information about target OS (on verbose)
ansible.builtin.include_tasks: os_info.yml
ansible.builtin.include_tasks:
file: os_info.yml

- name: Run simple versionscheck (optional)
ansible.builtin.include_tasks: versioncheck.yml
ansible.builtin.include_tasks:
file: versioncheck.yml
when: submodules_versioncheck | bool

- name: Adding additional apt sources (optional)
ansible.builtin.include_tasks: sources_ethz.yml
ansible.builtin.include_tasks:
file: sources_ethz.yml
when:
- l3d_pkgs__adding_ethz | bool
- ansible_architecture == 'x86_64'
- ansible_distribution == 'Debian' and ansible_distribution_version | float >= 8
- ansible_pkg_mgr == "apt"

- name: Install packages based on selection
ansible.builtin.include_tasks: packages.yml
ansible.builtin.include_tasks:
file: packages.yml

- name: Upgrade all packages to latest
become: true
Expand Down
Loading

0 comments on commit aee79b1

Please sign in to comment.