More ansible-lint fixes

This commit is contained in:
Slavi Pantaleev
2022-07-18 12:28:39 +03:00
parent 983bf819ef
commit d073c7ecb3
84 changed files with 230 additions and 206 deletions

View File

@ -1,13 +1,13 @@
---
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat.yml"
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int < 8
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int < 8
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat8.yml"
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 7 and ansible_distribution_major_version|int < 30
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7 and ansible_distribution_major_version | int < 30
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_fedora.yml"
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 30
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 30
- block:
# ansible_lsb is only available if lsb-release is installed.
@ -20,7 +20,7 @@
register: lsb_release_installation_result
- name: Reread ansible_lsb facts if lsb-release got installed
setup: filter=ansible_lsb*
ansible.builtin.setup: filter=ansible_lsb*
when: lsb_release_installation_result.changed
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml"

View File

@ -10,8 +10,8 @@
update_cache: true
- name: Ensure Docker's APT key is trusted
apt_key:
url: "https://download.docker.com/linux/{{ ansible_distribution|lower }}/gpg"
ansible.builtin.apt_key:
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
register: add_repository_key
@ -19,8 +19,8 @@
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure Docker repository is enabled
apt_repository:
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable"
ansible.builtin.apt_repository:
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
state: present
update_cache: true
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
@ -36,6 +36,6 @@
ansible.builtin.apt:
name:
- "{{ matrix_docker_package_name }}"
- "python{{'3' if ansible_python.version.major == 3 else ''}}-docker"
- "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker"
state: latest
when: matrix_docker_installation_enabled | bool

View File

@ -12,7 +12,7 @@
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure Docker's RPM key is trusted
rpm_key:
ansible.builtin.rpm_key:
state: present
key: https://download.docker.com/linux/fedora/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
@ -33,7 +33,7 @@
when: matrix_docker_installation_enabled | bool
- name: Ensure Docker-Py is installed
pip:
ansible.builtin.pip:
name: docker-py
state: latest
when: matrix_docker_installation_enabled | bool

View File

@ -10,7 +10,7 @@
update_cache: true
- name: Ensure Docker's APT key is trusted
apt_key:
ansible.builtin.apt_key:
url: https://download.docker.com/linux/raspbian/gpg
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
@ -19,7 +19,7 @@
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure Docker repository is enabled
apt_repository:
ansible.builtin.apt_repository:
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable"
state: present
update_cache: true

View File

@ -10,7 +10,7 @@
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure Docker's RPM key is trusted
rpm_key:
ansible.builtin.rpm_key:
state: present
key: https://download.docker.com/linux/centos/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'

View File

@ -10,7 +10,7 @@
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure Docker's RPM key is trusted
rpm_key:
ansible.builtin.rpm_key:
state: present
key: https://download.docker.com/linux/centos/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
@ -38,7 +38,7 @@
when: matrix_docker_installation_enabled | bool
- name: Ensure Docker-Py is installed
pip:
ansible.builtin.pip:
name: docker-py
state: latest
when: matrix_docker_installation_enabled | bool