Skip to content

Commit

Permalink
fix: adding linting and release workflow with github actions (#2)
Browse files Browse the repository at this point in the history
* feat: adding linting and release workflow with github actions
* fix: ansible-lint errors
  • Loading branch information
mabunixda authored Dec 15, 2021
1 parent c0c540a commit 24a7dae
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

warn_list:
- '301'
- '302'
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms
patreon: mabunixda
custom: https://www.paypal.me/kervehrt
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@master
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
changelog-file: CHANGELOG.md
- uses: rhysd/changelog-from-release/action@v2
if: steps.semrel.outputs.version != ''
with:
file: CHANGELOG.md
github_token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 7 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
---

galaxy_info:
role_name: ansible_udmp
namespace: mabunixda
author: Martin Buchleitner
description: Update Ubiquiti UDM (pro) Configuration with custom startup scripts and certificates
company: Martin Buchleitner
license: BSD
min_ansible_version: 2.5

platforms:
- unifi
- name: Unifi
version:
- UDMP

galaxy_tags:
- ubiquiti
- udmpro
- udm
- udm-utilities
- unifi

dependencies: []
12 changes: 6 additions & 6 deletions tasks/onboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
raw: "{{ unifi_os_cmd }} dpkg-query --showformat='${Version}' --show udm-boot"

- name: onboot - installation
when: onboot_version.stdout != udm_boot_version
when: onboot_version.stdout != udm_onboot_version
block:
- name: onboot - download package
raw: curl -L "{{ unifi_onboot_download_uri }}" -o "{{ unifi_mount_path }}/unifi-os/udm-boot-{{ udm_onboot_version }}.deb"
- name: onboot - install package
raw: "{{ unifi_os_cmd }} dpkg -i {{ unifi_os_mount_path }}/udm-boot-{{ udm_onboot_version }}.deb"
- name: onboot - download package
raw: curl -L "{{ unifi_onboot_download_uri }}" -o "{{ unifi_mount_path }}/unifi-os/udm-boot-{{ udm_onboot_version }}.deb"
- name: onboot - install package
raw: "{{ unifi_os_cmd }} dpkg -i {{ unifi_os_mount_path }}/udm-boot-{{ udm_onboot_version }}.deb"

- name: onboot - ensure onboot directory exists
raw: mkdir -p "{{ unifi_onboot_directory }}"
Expand All @@ -23,7 +23,7 @@
- { file: "files/05-onboot-container.sh", enabled: yes }
- { file: "files/10-onboot-frr.sh", enabled: yes }
- { file: "files/10-onboot-rsyncd.sh", enabled: yes }
- { file: "files/10-onboot-nodeexporter.sh", enables: "{{ nodeexporter_enabled | bool }}" }
- { file: "files/10-onboot-nodeexporter.sh", enabled: "{{ nodeexporter_enabled | bool }}" }
- { file: "files/10-onboot-openvpn.sh", enabled: "{{ openvpn_enabled | bool }}" }
- { file: "files/10-onboot-zerotier.sh", enabled: "{{ zerotier_enabled | bool }}" }
shell:
Expand Down

0 comments on commit 24a7dae

Please sign in to comment.