From 01a538816998d7fc676015873d112354c0a339f7 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Sun, 25 Feb 2018 12:12:45 +0100 Subject: [PATCH] Verify YAML syntax in gates Test yaml syntax is correct on new changes. Fixes current warnings and errors Change-Id: I5888f8e4a9d27a08506036df2c564b9f2081ccee --- .yamllint | 9 +++++++++ .zuul.d/base.yaml | 1 - .zuul.d/centos.yaml | 1 - releasenotes/notes/add-congress-877644b4b0e2ed0a.yaml | 6 +++--- releasenotes/notes/add-watcher-a97995ace827cf71.yaml | 10 +++++----- .../notes/congress-broken-cbf8ca59d90a85cb.yaml | 3 ++- ...remove-nova-network-container-69f8c0b61b3aed5a.yaml | 1 - roles/collectd/defaults/main.yml | 1 + roles/collectd/handlers/main.yml | 1 + tests/playbooks/post.yml | 1 + tests/playbooks/pre.yml | 1 + tests/playbooks/run.yml | 1 + tox.ini | 4 ++++ 13 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000000..de74ae3a96 --- /dev/null +++ b/.yamllint @@ -0,0 +1,9 @@ +extends: default +ignore: | + .tox/ + +rules: + line-length: disable + truthy: disable + braces: + max-spaces-inside: 1 diff --git a/.zuul.d/base.yaml b/.zuul.d/base.yaml index fa09343a47..8ac4dff9c7 100644 --- a/.zuul.d/base.yaml +++ b/.zuul.d/base.yaml @@ -53,4 +53,3 @@ - ^doc/.* vars: publisher: false - diff --git a/.zuul.d/centos.yaml b/.zuul.d/centos.yaml index 64bb42a2f4..0f543ed95e 100644 --- a/.zuul.d/centos.yaml +++ b/.zuul.d/centos.yaml @@ -56,4 +56,3 @@ publisher: true secrets: - kolla_dockerhub_creds - diff --git a/releasenotes/notes/add-congress-877644b4b0e2ed0a.yaml b/releasenotes/notes/add-congress-877644b4b0e2ed0a.yaml index 4a150d0948..4e500c7834 100644 --- a/releasenotes/notes/add-congress-877644b4b0e2ed0a.yaml +++ b/releasenotes/notes/add-congress-877644b4b0e2ed0a.yaml @@ -1,5 +1,5 @@ --- features: -- Add ansible role for openstack congress project which provide - policy as a service across any collection of cloud services in - order to offer governance and compliance for dynamic infrastructures. + - Add ansible role for openstack congress project which provide + policy as a service across any collection of cloud services in + order to offer governance and compliance for dynamic infrastructures. diff --git a/releasenotes/notes/add-watcher-a97995ace827cf71.yaml b/releasenotes/notes/add-watcher-a97995ace827cf71.yaml index 4e081ddeb3..3d4c1738b9 100644 --- a/releasenotes/notes/add-watcher-a97995ace827cf71.yaml +++ b/releasenotes/notes/add-watcher-a97995ace827cf71.yaml @@ -1,6 +1,6 @@ --- - features: - - Introduce OpenStack Infrastructure Optimization - service, also known as Watcher. This project makes - use of Ceilometer data to rebalance the cloud to - meet declared goals and strategies. +features: + - Introduce OpenStack Infrastructure Optimization + service, also known as Watcher. This project makes + use of Ceilometer data to rebalance the cloud to + meet declared goals and strategies. diff --git a/releasenotes/notes/congress-broken-cbf8ca59d90a85cb.yaml b/releasenotes/notes/congress-broken-cbf8ca59d90a85cb.yaml index 1ea4e38fda..0109d8a999 100644 --- a/releasenotes/notes/congress-broken-cbf8ca59d90a85cb.yaml +++ b/releasenotes/notes/congress-broken-cbf8ca59d90a85cb.yaml @@ -1,3 +1,4 @@ +--- other: - Congress doesn't work correctly out of the box and will - not deploy. See Bug #1634641. + not deploy. See Bug https://bugs.launchpad.net/kolla-ansible/+bug/1634641. diff --git a/releasenotes/notes/remove-nova-network-container-69f8c0b61b3aed5a.yaml b/releasenotes/notes/remove-nova-network-container-69f8c0b61b3aed5a.yaml index 4c3edc81bd..cac52af877 100644 --- a/releasenotes/notes/remove-nova-network-container-69f8c0b61b3aed5a.yaml +++ b/releasenotes/notes/remove-nova-network-container-69f8c0b61b3aed5a.yaml @@ -2,4 +2,3 @@ deprecations: - The nova-network service was deprecated, we remove it from the nova container. - diff --git a/roles/collectd/defaults/main.yml b/roles/collectd/defaults/main.yml index 5f5bceafc1..0cbb0e8585 100644 --- a/roles/collectd/defaults/main.yml +++ b/roles/collectd/defaults/main.yml @@ -1,3 +1,4 @@ +--- collectd_packages: RedHat: - collectd diff --git a/roles/collectd/handlers/main.yml b/roles/collectd/handlers/main.yml index 4ca4e94ce6..3ec96219c1 100644 --- a/roles/collectd/handlers/main.yml +++ b/roles/collectd/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: restart collectd service service: name: collectd diff --git a/tests/playbooks/post.yml b/tests/playbooks/post.yml index 8f37351114..413d3f757e 100644 --- a/tests/playbooks/post.yml +++ b/tests/playbooks/post.yml @@ -1,3 +1,4 @@ +--- - hosts: all roles: - collect-collectd diff --git a/tests/playbooks/pre.yml b/tests/playbooks/pre.yml index 40f3f1213e..b368ebda00 100644 --- a/tests/playbooks/pre.yml +++ b/tests/playbooks/pre.yml @@ -1,3 +1,4 @@ +--- - hosts: all become: true roles: diff --git a/tests/playbooks/run.yml b/tests/playbooks/run.yml index 92af9d639a..5d9b40f633 100644 --- a/tests/playbooks/run.yml +++ b/tests/playbooks/run.yml @@ -1,3 +1,4 @@ +--- - hosts: all vars: kolla_inventory_path: "{{ zuul.project.src_dir }}/inventory" diff --git a/tox.ini b/tox.ini index a3e0df0ff9..3f63d244d3 100644 --- a/tox.ini +++ b/tox.ini @@ -31,12 +31,16 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' coverage report --show-missing [testenv:pep8] +deps = + {[testenv]deps} + yamllint commands = {toxinidir}/tools/run-bashate.sh flake8 {posargs} {toxinidir}/tools/validate-all-dockerfiles.sh python {toxinidir}/tools/validate-all-file.py bandit -r docker kolla tests tools + yamllint . [testenv:bandit] commands = bandit -r docker kolla tests tools