ansible-lint: E403 Package installs should not use latest (#4500)
parent
bba6d0c613
commit
b218e17f44
|
@ -14,7 +14,6 @@ skip_list:
|
||||||
- '303'
|
- '303'
|
||||||
- '305'
|
- '305'
|
||||||
- '306'
|
- '306'
|
||||||
- '403'
|
|
||||||
- '404'
|
- '404'
|
||||||
- '502'
|
- '502'
|
||||||
- '503'
|
- '503'
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Upgrade all packages to the latest version (yum)
|
|
||||||
yum:
|
|
||||||
name: '*'
|
|
||||||
state: latest
|
|
||||||
when: ansible_os_family == "RedHat"
|
|
||||||
|
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
yum:
|
yum:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: latest
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- bind-utils
|
- bind-utils
|
||||||
- ntp
|
- ntp
|
||||||
|
@ -21,23 +15,13 @@
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: latest
|
state: present
|
||||||
install_recommends: no
|
install_recommends: no
|
||||||
with_items:
|
with_items:
|
||||||
- dnsutils
|
- dnsutils
|
||||||
- ntp
|
- ntp
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: Upgrade all packages to the latest version (apt)
|
|
||||||
shell: apt-get -o \
|
|
||||||
Dpkg::Options::=--force-confdef -o \
|
|
||||||
Dpkg::Options::=--force-confold -q -y \
|
|
||||||
dist-upgrade
|
|
||||||
environment:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
|
|
||||||
|
|
||||||
# Create deployment user if required
|
# Create deployment user if required
|
||||||
- include: user.yml
|
- include: user.yml
|
||||||
when: k8s_deployment_user is defined
|
when: k8s_deployment_user is defined
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
- name: install growpart
|
- name: install growpart
|
||||||
package:
|
package:
|
||||||
name: cloud-utils-growpart
|
name: cloud-utils-growpart
|
||||||
state: latest
|
state: present
|
||||||
|
|
||||||
- name: check if growpart needs to be run
|
- name: check if growpart needs to be run
|
||||||
command: growpart -N /dev/sda 1
|
command: growpart -N /dev/sda 1
|
||||||
|
|
Loading…
Reference in New Issue