test-playbooks: avoid warnings with shell/command
Avoids runtime warnings from use of Ansible shell/command module when executed commands also have ansible modules. Change-Id: I4e415cbd34f0f4cb15857051bf95458e0316de86
This commit is contained in:
parent
1d4ef3e866
commit
5c263fb437
@ -18,6 +18,7 @@
|
|||||||
command: git commit -a -m "test update"
|
command: git commit -a -m "test update"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
|
warn: false
|
||||||
|
|
||||||
- name: Failed dhall-diff
|
- name: Failed dhall-diff
|
||||||
include_role:
|
include_role:
|
||||||
|
@ -6,8 +6,11 @@
|
|||||||
# Simulate workload
|
# Simulate workload
|
||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
|
# Not using ansible pause module on purpose in order to simulate the load
|
||||||
- name: Simulate workload
|
- name: Simulate workload
|
||||||
shell: "sleep 10"
|
command: sleep 10
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Remove tox package with pip
|
- name: Remove tox package with pip
|
||||||
shell: pip uninstall -y tox
|
shell: pip uninstall -y tox
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
become: true
|
become: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
- name: Remove tox package with pip3
|
- name: Remove tox package with pip3
|
||||||
shell: pip3 uninstall -y tox
|
shell: pip3 uninstall -y tox
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
become: true
|
become: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
- name: Verify tox is not installed
|
- name: Verify tox is not installed
|
||||||
|
@ -5,3 +5,5 @@
|
|||||||
|
|
||||||
- name: Copy file over zuul-jobs
|
- name: Copy file over zuul-jobs
|
||||||
command: rsync -a new-project/ "{{ zuul.project.src_dir }}/"
|
command: rsync -a new-project/ "{{ zuul.project.src_dir }}/"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
shell: |
|
shell: |
|
||||||
mkdir -p {{ zuul.project.src_dir }}
|
mkdir -p {{ zuul.project.src_dir }}
|
||||||
tar czf {{ zuul.project.src_dir }}/dist.tgz /etc/os-release
|
tar czf {{ zuul.project.src_dir }}/dist.tgz /etc/os-release
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- import_role:
|
||||||
name: fetch-javascript-tarball
|
name: fetch-javascript-tarball
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
shell: |
|
shell: |
|
||||||
mkdir -p {{ zuul.project.src_dir }}/doc/build/html
|
mkdir -p {{ zuul.project.src_dir }}/doc/build/html
|
||||||
echo "<body>Hello</body>" > {{ zuul.project.src_dir }}/doc/build/html/index.html
|
echo "<body>Hello</body>" > {{ zuul.project.src_dir }}/doc/build/html/index.html
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- import_role:
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
mkdir -p {{ zuul.project.src_dir }}/doc/build/html
|
mkdir -p {{ zuul.project.src_dir }}/doc/build/html
|
||||||
echo "%PDF-1.2" > {{ zuul.project.src_dir }}/doc/build/pdf/doc-{{ zuul.project.short_name }}.pdf
|
echo "%PDF-1.2" > {{ zuul.project.src_dir }}/doc/build/pdf/doc-{{ zuul.project.short_name }}.pdf
|
||||||
echo "<body>Hello</body>" > {{ zuul.project.src_dir }}/doc/build/html/index.html
|
echo "<body>Hello</body>" > {{ zuul.project.src_dir }}/doc/build/html/index.html
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- import_role:
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
command: kubectl wait --for=condition=Ready pod/quaytest --timeout=60s
|
command: kubectl wait --for=condition=Ready pod/quaytest --timeout=60s
|
||||||
- name: Check the output of the pod
|
- name: Check the output of the pod
|
||||||
shell: "kubectl logs pod/quaytest | grep 'Zuul container test'"
|
shell: "kubectl logs pod/quaytest | grep 'Zuul container test'"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
- name: Run a remote test pod
|
- name: Run a remote test pod
|
||||||
command: kubectl run --generator=run-pod/v1 --image=docker.io/debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
command: kubectl run --generator=run-pod/v1 --image=docker.io/debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
||||||
@ -29,3 +31,5 @@
|
|||||||
command: kubectl wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
|
command: kubectl wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
|
||||||
- name: Check the output of the pod
|
- name: Check the output of the pod
|
||||||
shell: "kubectl logs pod/upstream-dockertest | grep 'Upstream'"
|
shell: "kubectl logs pod/upstream-dockertest | grep 'Upstream'"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
command: kubectl wait --for=condition=Ready pod/dockertest --timeout=60s
|
command: kubectl wait --for=condition=Ready pod/dockertest --timeout=60s
|
||||||
- name: Check the output of the pod
|
- name: Check the output of the pod
|
||||||
shell: "kubectl logs pod/dockertest | grep 'Zuul container test'"
|
shell: "kubectl logs pod/dockertest | grep 'Zuul container test'"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
- name: Run a remote test pod
|
- name: Run a remote test pod
|
||||||
command: kubectl run --generator=run-pod/v1 --image=debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
command: kubectl run --generator=run-pod/v1 --image=debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
command: oc wait --for=condition=Ready pod/dockertest --timeout=60s
|
command: oc wait --for=condition=Ready pod/dockertest --timeout=60s
|
||||||
- name: Check the output of the pod
|
- name: Check the output of the pod
|
||||||
shell: "oc logs pod/dockertest | grep 'Zuul container test'"
|
shell: "oc logs pod/dockertest | grep 'Zuul container test'"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
- name: Run a remote test pod
|
- name: Run a remote test pod
|
||||||
command: oc run --generator=run-pod/v1 --image=debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
command: oc run --generator=run-pod/v1 --image=debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
||||||
@ -25,3 +27,5 @@
|
|||||||
command: oc wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
|
command: oc wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
|
||||||
- name: Check the output of the pod
|
- name: Check the output of the pod
|
||||||
shell: "oc logs pod/upstream-dockertest | grep 'Upstream'"
|
shell: "oc logs pod/upstream-dockertest | grep 'Upstream'"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
@ -129,6 +129,8 @@
|
|||||||
mkdir -p src/openstack.org/project/fake-sibling &&
|
mkdir -p src/openstack.org/project/fake-sibling &&
|
||||||
touch src/opendev.org/project/fake-sibling/file &&
|
touch src/opendev.org/project/fake-sibling/file &&
|
||||||
touch src/openstack.org/project/fake-sibling/file
|
touch src/openstack.org/project/fake-sibling/file
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
include_role:
|
include_role:
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Remove tox package with pip
|
- name: Remove tox package with pip
|
||||||
shell: pip uninstall -y tox
|
shell: pip uninstall -y tox
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
become: true
|
become: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
- name: Remove tox package with pip3
|
- name: Remove tox package with pip3
|
||||||
shell: pip3 uninstall -y tox
|
shell: pip3 uninstall -y tox
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
become: true
|
become: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
- name: Verify tox is not installed
|
- name: Verify tox is not installed
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
- name: Get localhost ssh host public key
|
- name: Get localhost ssh host public key
|
||||||
shell: ssh-keyscan -t rsa localhost
|
shell: ssh-keyscan -t rsa localhost
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
register: host_key
|
register: host_key
|
||||||
tasks:
|
tasks:
|
||||||
- name: Get git commit hash for current patch of zuul-jobs
|
- name: Get git commit hash for current patch of zuul-jobs
|
||||||
@ -38,6 +40,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
||||||
|
warn: false
|
||||||
register: current_commit
|
register: current_commit
|
||||||
|
|
||||||
- name: Clone upstream zuul-jobs as a bare repository
|
- name: Clone upstream zuul-jobs as a bare repository
|
||||||
@ -71,6 +74,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
args:
|
args:
|
||||||
chdir: "{{ test_repo_path }}"
|
chdir: "{{ test_repo_path }}"
|
||||||
|
warn: false
|
||||||
register: after_mirror
|
register: after_mirror
|
||||||
|
|
||||||
- name: Assert that the git repositories have the same commit for HEAD
|
- name: Assert that the git repositories have the same commit for HEAD
|
||||||
|
Loading…
Reference in New Issue
Block a user