From 211ff20891747f638ad953b884c227d5344901af Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 18 Jul 2022 14:08:35 +0300 Subject: [PATCH] Fix package-latest ansible-lint errors Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#package-latest --- roles/matrix-base/tasks/server_base/setup_archlinux.yml | 4 ++-- roles/matrix-base/tasks/server_base/setup_debian.yml | 4 ++-- roles/matrix-base/tasks/server_base/setup_fedora.yml | 6 +++--- roles/matrix-base/tasks/server_base/setup_raspbian.yml | 4 ++-- roles/matrix-base/tasks/server_base/setup_redhat.yml | 4 ++-- roles/matrix-base/tasks/server_base/setup_redhat8.yml | 8 ++++---- roles/matrix-base/tasks/util/ensure_fuse_installed.yml | 6 +++--- roles/matrix-base/tasks/util/ensure_openssl_installed.yml | 6 +++--- roles/matrix-ma1sd/tasks/setup_install.yml | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/roles/matrix-base/tasks/server_base/setup_archlinux.yml b/roles/matrix-base/tasks/server_base/setup_archlinux.yml index 73c18ceef..c912e58f3 100644 --- a/roles/matrix-base/tasks/server_base/setup_archlinux.yml +++ b/roles/matrix-base/tasks/server_base/setup_archlinux.yml @@ -5,12 +5,12 @@ name: - python-docker - python-dnspython - state: latest + state: present update_cache: true - name: Ensure Docker is installed pacman: name: - docker - state: latest + state: present when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_debian.yml b/roles/matrix-base/tasks/server_base/setup_debian.yml index d6ef5cd90..271fab41f 100644 --- a/roles/matrix-base/tasks/server_base/setup_debian.yml +++ b/roles/matrix-base/tasks/server_base/setup_debian.yml @@ -29,7 +29,7 @@ ansible.builtin.apt: name: - "{{ matrix_ntpd_package }}" - state: latest + state: present update_cache: true - name: Ensure Docker is installed @@ -37,5 +37,5 @@ name: - "{{ matrix_docker_package_name }}" - "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker" - state: latest + state: present when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_fedora.yml b/roles/matrix-base/tasks/server_base/setup_fedora.yml index b5646c8f6..2c7d528fb 100644 --- a/roles/matrix-base/tasks/server_base/setup_fedora.yml +++ b/roles/matrix-base/tasks/server_base/setup_fedora.yml @@ -21,7 +21,7 @@ ansible.builtin.yum: name: - "{{ matrix_ntpd_package }}" - state: latest + state: present update_cache: true - name: Ensure Docker is installed @@ -29,11 +29,11 @@ name: - "{{ matrix_docker_package_name }}" - python3-pip - state: latest + state: present when: matrix_docker_installation_enabled | bool - name: Ensure Docker-Py is installed ansible.builtin.pip: name: docker-py - state: latest + state: present when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_raspbian.yml b/roles/matrix-base/tasks/server_base/setup_raspbian.yml index b5eb40168..54ea4d185 100644 --- a/roles/matrix-base/tasks/server_base/setup_raspbian.yml +++ b/roles/matrix-base/tasks/server_base/setup_raspbian.yml @@ -29,7 +29,7 @@ ansible.builtin.apt: name: - "{{ matrix_ntpd_package }}" - state: latest + state: present update_cache: true - name: Ensure Docker is installed @@ -37,5 +37,5 @@ name: - "{{ matrix_docker_package_name }}" - "python{{'3' if ansible_python.version.major == 3 else ''}}-docker" - state: latest + state: present when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_redhat.yml b/roles/matrix-base/tasks/server_base/setup_redhat.yml index 189fcecdd..4e5c97d4d 100644 --- a/roles/matrix-base/tasks/server_base/setup_redhat.yml +++ b/roles/matrix-base/tasks/server_base/setup_redhat.yml @@ -19,7 +19,7 @@ ansible.builtin.yum: name: - "{{ matrix_ntpd_package }}" - state: latest + state: present update_cache: true - name: Ensure Docker is installed @@ -27,5 +27,5 @@ name: - "{{ matrix_docker_package_name }}" - docker-python - state: latest + state: present when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_redhat8.yml b/roles/matrix-base/tasks/server_base/setup_redhat8.yml index 9e1aaa010..932dbab50 100644 --- a/roles/matrix-base/tasks/server_base/setup_redhat8.yml +++ b/roles/matrix-base/tasks/server_base/setup_redhat8.yml @@ -19,14 +19,14 @@ ansible.builtin.yum: name: - epel-release - state: latest + state: present update_cache: true - name: Ensure yum packages are installed ansible.builtin.yum: name: - "{{ matrix_ntpd_package }}" - state: latest + state: present update_cache: true - name: Ensure Docker is installed @@ -34,11 +34,11 @@ name: - "{{ matrix_docker_package_name }}" - python3-pip - state: latest + state: present when: matrix_docker_installation_enabled | bool - name: Ensure Docker-Py is installed ansible.builtin.pip: name: docker-py - state: latest + state: present when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/util/ensure_fuse_installed.yml b/roles/matrix-base/tasks/util/ensure_fuse_installed.yml index dfb1ddc80..47d2d9e85 100644 --- a/roles/matrix-base/tasks/util/ensure_fuse_installed.yml +++ b/roles/matrix-base/tasks/util/ensure_fuse_installed.yml @@ -4,7 +4,7 @@ ansible.builtin.yum: name: - fuse - state: latest + state: present when: ansible_os_family == 'RedHat' # This is for both Debian and Raspbian @@ -12,12 +12,12 @@ ansible.builtin.apt: name: - fuse - state: latest + state: present when: ansible_os_family == 'Debian' - name: Ensure fuse installed (Archlinux) pacman: name: - fuse3 - state: latest + state: present when: ansible_distribution == 'Archlinux' diff --git a/roles/matrix-base/tasks/util/ensure_openssl_installed.yml b/roles/matrix-base/tasks/util/ensure_openssl_installed.yml index 909c0f1cb..ae22fb495 100644 --- a/roles/matrix-base/tasks/util/ensure_openssl_installed.yml +++ b/roles/matrix-base/tasks/util/ensure_openssl_installed.yml @@ -4,7 +4,7 @@ ansible.builtin.yum: name: - openssl - state: latest + state: present when: ansible_os_family == 'RedHat' # This is for both Debian and Raspbian @@ -12,12 +12,12 @@ ansible.builtin.apt: name: - openssl - state: latest + state: present when: ansible_os_family == 'Debian' - name: Ensure openssl installed (Archlinux) pacman: name: - openssl - state: latest + state: present when: ansible_distribution == 'Archlinux' diff --git a/roles/matrix-ma1sd/tasks/setup_install.yml b/roles/matrix-ma1sd/tasks/setup_install.yml index 61f01b292..073f22aa2 100644 --- a/roles/matrix-ma1sd/tasks/setup_install.yml +++ b/roles/matrix-ma1sd/tasks/setup_install.yml @@ -75,7 +75,7 @@ pacman: name: - gradle - state: latest + state: present update_cache: true when: ansible_distribution == 'Archlinux'