Skip to content

Commit

Permalink
Add linter into CI and fix linter issues
Browse files Browse the repository at this point in the history
This commit adds the linter check for YAML and Markdown files, and fixes the
already present issues.
  • Loading branch information
rascasoft committed Jan 11, 2024
1 parent 0d3063b commit 07ca326
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---

name: Linter and test the project
name: Linter and test the project

env:
ANSIBLE_INVENTORY_UNPARSED_WARNING: 'False'
ANSIBLE_LOCALHOST_WARNING: 'False'

on: [push]
on: ['push']

jobs:
lint:
Expand All @@ -17,8 +17,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: YAML check
run: yamllint tests/terraform_tfs_generator.yml
- name: Markdown files check
run: mdl $(find . -name *.md)
- name: YAML files check
run: yamllint $(find . -name *.yml -or -name *.yaml)
- name: Ansible Linter check
run: ansible-lint tests/terraform_tfs_generator.yml
- name: Ansible syntax check
Expand Down
6 changes: 3 additions & 3 deletions tasks/azure-vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
dest: "{{ item.dest }}"
mode: '0640'
with_items:
- { src: "azure/vms.tf.j2", dest: "{{ terraform_config_dir }}/azure/{{ group_name }}.vms.tf" }
- { src: "azure/disks.tf.j2", dest: "{{ terraform_config_dir }}/azure/{{ group_name }}.disks.tf" }
- { src: "azure/nics.tf.j2", dest: "{{ terraform_config_dir }}/azure/{{ group_name }}.nics.tf" }
- {src: "azure/vms.tf.j2", dest: "{{ terraform_config_dir }}/azure/{{ group_name }}.vms.tf"}
- {src: "azure/disks.tf.j2", dest: "{{ terraform_config_dir }}/azure/{{ group_name }}.disks.tf"}
- {src: "azure/nics.tf.j2", dest: "{{ terraform_config_dir }}/azure/{{ group_name }}.nics.tf"}
2 changes: 1 addition & 1 deletion tasks/libvirt-vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
dest: "{{ item.dest }}"
mode: '0640'
with_items:
- { src: "libvirt/vms.tf.j2", dest: "{{ terraform_config_dir }}/{{ terraform_group_name }}.vms.tf" }
- {src: "libvirt/vms.tf.j2", dest: "{{ terraform_config_dir }}/{{ terraform_group_name }}.vms.tf"}

0 comments on commit 07ca326

Please sign in to comment.