ansible-lint: fix a bunch of command-instead-of-shell errors

These all trigger command-instead-of-shell for ansible-lint 6.12.0.
It seems a few were ignored with warnings with
I4e415cbd34f0f4cb15857051bf95458e0316de86.

I don't see why these can't be command: for consistency

Change-Id: Ib0f590b461d2a5a7d9bb8bdddcbbfb2230cc3d1c
This commit is contained in:
Ian Wienand 2023-02-02 13:07:08 +11:00
parent 818521ee77
commit 7a66a26b77
No known key found for this signature in database
5 changed files with 9 additions and 27 deletions

View File

@ -2,15 +2,11 @@
name: Remove any pre-installed nox name: Remove any pre-installed nox
tasks: tasks:
- name: Remove nox package with pip - name: Remove nox package with pip
shell: pip uninstall -y nox command: pip uninstall -y nox
args:
warn: false
become: true become: true
failed_when: false failed_when: false
- name: Remove nox package with pip3 - name: Remove nox package with pip3
shell: pip3 uninstall -y nox command: pip3 uninstall -y nox
args:
warn: false
become: true become: true
failed_when: false failed_when: false
- name: Verify nox is not installed - name: Verify nox is not installed

View File

@ -2,15 +2,11 @@
name: Remove any pre-installed tox name: Remove any pre-installed tox
tasks: tasks:
- name: Remove tox package with pip - name: Remove tox package with pip
shell: pip uninstall -y tox command: 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 command: 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

View File

@ -22,15 +22,13 @@
seconds: 60 seconds: 60
- name: Describe pod - name: Describe pod
shell: kubectl describe pods quaytest command: kubectl describe pods quaytest
- name: Wait for the pod to be ready - name: Wait for the pod to be ready
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 --image=docker.io/debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity' command: kubectl run --image=docker.io/debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
@ -40,12 +38,10 @@
seconds: 60 seconds: 60
- name: Describe pod - name: Describe pod
shell: kubectl describe pods upstream-dockertest command: kubectl describe pods upstream-dockertest
- name: Wait for the pod to be ready - name: Wait for the pod to be ready
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

View File

@ -2,15 +2,11 @@
name: Remove any pre-installed tox name: Remove any pre-installed tox
tasks: tasks:
- name: Remove tox package with pip - name: Remove tox package with pip
shell: pip uninstall -y tox command: 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 command: 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

View File

@ -30,9 +30,7 @@
key: "{{ public_key_contents.stdout }}" key: "{{ public_key_contents.stdout }}"
- name: Get localhost ssh host public key - name: Get localhost ssh host public key
shell: ssh-keyscan -t rsa localhost command: 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