fix ansible-lint errors

This commit is contained in:
Sergey Malyuk
2025-12-18 15:26:34 +03:00
parent 2c0224566e
commit 236c4cf189
7 changed files with 18 additions and 18 deletions

View File

@@ -9,7 +9,7 @@
- name: "Include default vars"
ansible.builtin.include_vars:
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults/"
extensions: [ 'yml' ]
extensions: ['yml']
- name: "Sanity check Docker by running a `hello-world` container" # noqa: no-changed-when
ansible.builtin.command:
@@ -19,13 +19,13 @@
ansible.builtin.command:
cmd: "docker compose version"
- name: "Check if Docker has the expected version" # noqa: no-changed-when
register: docker_version
- name: "Get docker version" # noqa: no-changed-when
register: docker_ubuntu_current_version
ansible.builtin.command:
cmd: "docker version --format '{{ '{{' }} .Server.Version {{ '}}' }}'"
- name: "Check if Docker has the expected version" # noqa: no-changed-when
ansible.builtin.assert:
that: "du_docker_version in docker_version.stdout"
success_msg: "Docker has the expected version ({{ docker_version.stdout }} )"
fail_msg: "Unexpected Docker version ({{ docker_version.stdout }})"
that: "docker_ubuntu_version in docker_ubuntu_current_version.stdout"
success_msg: "Docker has the expected version ({{ docker_ubuntu_current_version.stdout }} )"
fail_msg: "Unexpected Docker version ({{ docker_ubuntu_current_version.stdout }})"