Skip to content

Commit af56ad2

Browse files
authored
Adding Markdownlint config and setting ansible-lint version (#1)
* Adding Markdownlint config and setting ansible-lint version * Switching Ansible Lint to Poetry * Adding YAML lint ignore list * Adding ansible-lint to Poetry * Run ansible-lint via poetry. Update table of contents
1 parent 1a9bbb6 commit af56ad2

File tree

6 files changed

+242
-3
lines changed

6 files changed

+242
-3
lines changed

.github/workflows/ansible-lint.yml

+35-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,41 @@ jobs:
1212
- name: Checkout Code
1313
uses: actions/checkout@v2
1414

15+
- name: Setup Python 3.8
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
19+
architecture: x64
20+
21+
- name: Install Poetry
22+
uses: snok/install-poetry@v1
23+
with:
24+
version: 1.1.11
25+
virtualenvs-create: true
26+
virtualenvs-in-project: true
27+
28+
- name: Load cached venv
29+
id: cached-poetry-dependencies
30+
uses: actions/cache@v2
31+
with:
32+
path: .venv
33+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
34+
35+
- name: Install dependencies
36+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
37+
run: poetry install --no-interaction --no-root
38+
39+
- name: Install Package
40+
run: poetry install --no-interaction
41+
42+
- name: List installed packages
43+
shell: bash -l {0}
44+
run: |
45+
source $VENV
46+
pip list
47+
1548
- name: Run YAML Lint
16-
uses: ibiqlik/action-yamllint@v3
49+
run: poetry run yamllint .
1750

1851
- name: Run Ansible Lint
19-
uses: ansible/ansible-lint-action@master
52+
run: poetry run ansible-lint

.markdownlintrc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"default": true,
3+
"MD025": false,
4+
"MD013": {
5+
"line_length": 120,
6+
"tables": false,
7+
"code_blocks": false
8+
},
9+
"MD033": false,
10+
"MD036": false,
11+
"MD041": false
12+
}

.yamllint.yml

+7
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ extends: default
44
rules:
55
line-length:
66
max: 120
7+
8+
ignore: |
9+
__pycache__/
10+
.venv
11+
.vscode
12+
env/
13+
venv/

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<!-- markdownlint-disable-file MD014 -->
33

44
- [Ansible Amazon Base Repository](#ansible-amazon-base-repository)
5+
- [About](#about)
56
- [Setting Up Ansible Environment](#setting-up-ansible-environment)
67
- [Configuring Python VENV and Ansible](#configuring-python-venv-and-ansible)
78
- [Editor Configuration](#editor-configuration)
@@ -14,6 +15,7 @@
1415
- [Running Test Kitchen](#running-test-kitchen)
1516
- [Running Integration Tests](#running-integration-tests)
1617
- [Running Ansible Playbooks on AWS Instances](#running-ansible-playbooks-on-aws-instances)
18+
- [Example Project: Build a Local Docker/Containerd Server VM](#example-project-build-a-local-dockercontainerd-server-vm)
1719
- [Ansible References](#ansible-references)
1820

1921
## About

poetry.lock

+185-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pytest-testinfra = "^6.4.0"
1313
colorama = "^0.4.4"
1414
yamllint = "^1.26.3"
1515
codespell = "^2.1.0"
16+
ansible-lint = "^5.2.1"
1617

1718
[tool.poetry.dev-dependencies]
1819

0 commit comments

Comments
 (0)