Add yaml and ansible linters
Before we get too carried away, let's add some linters. This commit also fixes some linting failures in tripleo_ipa/meta/main.yml. Change-Id: Ic57d1b84a90ce5456812b9462c1af5539791b561
This commit is contained in:
parent
5b94e15b6b
commit
477907dd72
2
test-requirements.txt
Normal file
2
test-requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ansible-lint
|
||||||
|
yamllint
|
19
tox.ini
19
tox.ini
@ -1,7 +1,7 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
# add docs to the list of environments once we actually have docs to generate
|
# add docs to the list of environments once we actually have docs to generate
|
||||||
envlist = molecule
|
envlist = molecule, linters
|
||||||
skipdist = True
|
skipdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -15,3 +15,20 @@ changedir = {toxinidir}/tripleo_ipa
|
|||||||
commands = molecule test --all
|
commands = molecule test --all
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
tox
|
tox
|
||||||
|
|
||||||
|
[testenv:ansible-lint]
|
||||||
|
deps = {[testenv:linters]deps}
|
||||||
|
commands =
|
||||||
|
ansible-lint {toxinidir}/tripleo_ipa
|
||||||
|
|
||||||
|
[testenv:yamllint]
|
||||||
|
deps = {[testenv:linters]deps}
|
||||||
|
commands =
|
||||||
|
yamllint -c {toxinidir}/tripleo_ipa/.yamllint {toxinidir}/tripleo_ipa
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
deps =
|
||||||
|
-r {toxinidir}/test-requirements.txt
|
||||||
|
commands =
|
||||||
|
{[testenv:ansible-lint]commands}
|
||||||
|
{[testenv:yamllint]commands}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: your name
|
author: OpenStack
|
||||||
description: your role description
|
description: This role is used to integrate TripleO with FreeIPA.
|
||||||
company: your company (optional)
|
company: Red Hat
|
||||||
|
|
||||||
# If the issue tracker for your role is not on github, uncomment the
|
# If the issue tracker for your role is not on github, uncomment the
|
||||||
# next line and provide a value
|
# next line and provide a value
|
||||||
@ -27,17 +27,10 @@ galaxy_info:
|
|||||||
# To view available platforms and versions (or releases), visit:
|
# To view available platforms and versions (or releases), visit:
|
||||||
# https://galaxy.ansible.com/api/v1/platforms/
|
# https://galaxy.ansible.com/api/v1/platforms/
|
||||||
#
|
#
|
||||||
# platforms:
|
platforms:
|
||||||
# - name: Fedora
|
- name: CentOS
|
||||||
# versions:
|
versions:
|
||||||
# - all
|
- 8
|
||||||
# - 25
|
|
||||||
# - name: SomePlatform
|
|
||||||
# versions:
|
|
||||||
# - all
|
|
||||||
# - 1.0
|
|
||||||
# - 7
|
|
||||||
# - 99.99
|
|
||||||
|
|
||||||
galaxy_tags: []
|
galaxy_tags: []
|
||||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||||
@ -50,4 +43,3 @@ galaxy_info:
|
|||||||
dependencies: []
|
dependencies: []
|
||||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||||
# if you add dependencies to this list.
|
# if you add dependencies to this list.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user