Commit e47af78b authored by Jeff Geerling's avatar Jeff Geerling
Browse files

Fixes #3: Fix linting issues, add ansible-lint and yamllint configuration.

parent bad25d1b
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
---
name: Lint
'on':
  pull_request:
  push:
    branches:
      - master

jobs:

  test:
    name: Lint
    runs-on: ubuntu-latest

    steps:
      - name: Check out the codebase.
        uses: actions/checkout@v2

      - name: Set up Python 3.7.
        uses: actions/setup-python@v2
        with:
          python-version: '3.x'

      - name: Install test dependencies.
        run: pip3 install yamllint ansible-lint

      - name: Run yamllint.
        run: yamllint .

      - name: Run ansible-lint.
        run: ansible-lint

.yamllint

0 → 100644
+9 −0
Original line number Diff line number Diff line
---
extends: default

rules:
  line-length:
    max: 120
    level: warning
  truthy:
    allowed-values: ['true', 'false', 'yes', 'no']
+1 −0
Original line number Diff line number Diff line
---
k3s_version: v0.8.1
ansible_user: debian
systemd_dir: /etc/systemd/system
+1 −1
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@
  gather_facts: yes
  become: yes
  roles:
    - { role: reset }
    - role: reset
+22 −23
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@
    owner: root
    group: root
    mode: 755
#  when: ( ansible_facts.userspace_architecture == "x86_64" )
  when: ( ansible_facts.architecture == "x86_64" )
  when: ansible_facts.architecture == "x86_64"

- name: Download k3s binary arm64
  get_url:
@@ -22,9 +21,9 @@
    owner: root
    group: root
    mode: 755
  when: ( ansible_facts.architecture is search("arm") )
          and
        ( ansible_facts.userspace_bits == "64" )
  when:
    - ansible_facts.architecture is search("arm")
    - ansible_facts.userspace_bits == "64"

- name: Download k3s binary armhf
  get_url:
@@ -33,6 +32,6 @@
    owner: root
    group: root
    mode: 755
  when: ( ansible_facts.architecture is search("arm") )
          and
        ( ansible_facts.userspace_bits == "32" )
  when:
    - ansible_facts.architecture is search("arm")
    - ansible_facts.userspace_bits == "32"
Loading