Resolve ansible-lint test failures

With the merge of https://review.openstack.org/520177 in the
tests repo some ansible-lint failures which previously were
not being picked up are now detected.

This adds the appropriate skip tags to the tasks so that they
are not evaluated by ansible-lint.

Change-Id: I7572b7befa2af6af3c2102b79487913d14eb9d20
This commit is contained in:
Jesse Pretorius 2017-11-21 11:07:04 +00:00
parent 3101c7f4c9
commit e941396601
1 changed files with 9 additions and 0 deletions

View File

@ -32,25 +32,34 @@
- httplib2 - httplib2
- python-barbicanclient - python-barbicanclient
- python-openstackclient - python-openstackclient
- name: Check the barbican api - name: Check the barbican api
uri: uri:
url: "http://localhost:9311" url: "http://localhost:9311"
status_code: 200,300 status_code: 200,300
- name: Create a test secret - name: Create a test secret
shell: | shell: |
. /root/openrc . /root/openrc
openstack secret store --payload secrete --payload-content-type text/plain openstack secret store --payload secrete --payload-content-type text/plain
register: barbican_secret_store register: barbican_secret_store
tags:
- skip_ansible_lint
- name: Register secret location - name: Register secret location
set_fact: set_fact:
secret_ref: "{{ item.split('|')[2] }}" secret_ref: "{{ item.split('|')[2] }}"
with_items: "{{ barbican_secret_store.stdout_lines }}" with_items: "{{ barbican_secret_store.stdout_lines }}"
when: item.find('Secret href') != -1 when: item.find('Secret href') != -1
- name: Retrieve test secret - name: Retrieve test secret
shell: | shell: |
. /root/openrc . /root/openrc
openstack secret get --decrypt --payload_content_type text/plain {{ secret_ref }} openstack secret get --decrypt --payload_content_type text/plain {{ secret_ref }}
register: barbican_secret_store register: barbican_secret_store
tags:
- skip_ansible_lint
- name: Check retrieved secret - name: Check retrieved secret
assert: assert:
that: barbican_secret_store.stdout.find('secrete') != -1 that: barbican_secret_store.stdout.find('secrete') != -1