From b5408ca3fc1ceba0f3653e8c3c4641f1da0d8926 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 28 May 2020 19:11:28 +0100 Subject: [PATCH] test-playbooks: improved syntax - added space around jinja variables - use "name" argument on include_role, instead of undocumented role Change-Id: I0984ca391667ace24705b20dd60eddd90e3a281e --- test-playbooks/ansible-lint-rules/run.yaml | 8 ++++---- test-playbooks/ensure-tox.yaml | 2 +- test-playbooks/registry/buildset-registry.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test-playbooks/ansible-lint-rules/run.yaml b/test-playbooks/ansible-lint-rules/run.yaml index 3581612bd..900394ebc 100644 --- a/test-playbooks/ansible-lint-rules/run.yaml +++ b/test-playbooks/ansible-lint-rules/run.yaml @@ -9,7 +9,7 @@ - name: Install linters-requirements.txt pip: - requirements: "{{ansible_user_dir}}/{{ zuul.project.src_dir }}/linters-requirements.txt" + requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/linters-requirements.txt" virtualenv: "{{ ansible_lint_tempdir.path }}" - name: Make sure ansible-lint is installed @@ -22,7 +22,7 @@ -maxdepth 4 -wholename '*ZUULJOBS*/faulty/*/*' args: - chdir: "{{ ansible_user_dir}}/{{ zuul.project.src_dir }}" + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" register: faulty_ansible_items - name: Get valid playbooks and roles @@ -32,7 +32,7 @@ -maxdepth 4 -wholename '*ZUULJOBS*/valid/roles/*' args: - chdir: "{{ ansible_user_dir}}/{{ zuul.project.src_dir }}" + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" register: valid_ansible_items - name: Make sure faulty roles fail linting @@ -52,7 +52,7 @@ -t {{ item | regex_replace('.*/(ZUULJOBS.*?)/.*', '\1') }} {{ item }} args: - chdir: "{{ansible_user_dir}}/{{ zuul.project.src_dir }}" + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" register: ansible_lint failed_when: ansible_lint.rc != 0 loop: "{{ valid_ansible_items.stdout_lines }}" diff --git a/test-playbooks/ensure-tox.yaml b/test-playbooks/ensure-tox.yaml index 854b37b39..95285c50d 100644 --- a/test-playbooks/ensure-tox.yaml +++ b/test-playbooks/ensure-tox.yaml @@ -49,5 +49,5 @@ - name: Verify tox_executable is set to the virtualenv tox assert: that: - - tox_executable == '{{ ansible_user_dir}}/tox-venv/bin/tox' + - tox_executable == '{{ ansible_user_dir }}/tox-venv/bin/tox' diff --git a/test-playbooks/registry/buildset-registry.yaml b/test-playbooks/registry/buildset-registry.yaml index a0e6e4507..34baf50b2 100644 --- a/test-playbooks/registry/buildset-registry.yaml +++ b/test-playbooks/registry/buildset-registry.yaml @@ -9,7 +9,7 @@ # run use-buildset-registry. - name: Run the fake buildset registry include_role: - role: run-buildset-registry + name: run-buildset-registry vars: buildset_registry_root: "{{ ansible_user_dir }}/fake_buildset_registry" buildset_registry_port: 9000