Skip to content

Commit

Permalink
group_vars: make yum_lock_timeout configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
sk4zuzu committed Jan 27, 2021
1 parent 44f82de commit c466035
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ repository_url: "{{ custom_repository_url | default(local_repository_url, true)
local_image_registry: "{{ groups.image_registry[0] }}:5000"
image_registry_address: "{{ custom_image_registry_address | default(local_image_registry, true) }}"

# https://github.com/ansible/ansible/issues/57189
yum_lock_timeout: 300

kubeconfig:
local: "{{ inventory_dir }}/kubeconfig"
remote: /etc/kubernetes/admin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
block:
- include_tasks: "{{ ansible_os_family }}.yml"
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Print environment variables
debug:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
- docker-ce-cli-{{ docker_version.RedHat }}
- docker-ce-{{ docker_version.RedHat }}
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- include_tasks: configure-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
block:
- include_tasks: "{{ ansible_os_family }}.yml"
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
RedHat:
- elasticsearch-curator-{{ specification.curator_version }}
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- filebeat-{{ filebeat_version }}
register: install_filebeat_package
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Install Auditd package
package:
Expand All @@ -30,4 +30,4 @@
retries: 3 # Installing auditd sometimes fails in post-inst: https://bugs.launchpad.net/ubuntu/+source/auditd/+bug/1848330
delay: 1
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
block:
- include_tasks: "{{ ansible_os_family }}/install-firewall.yml"
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Include configuration tasks
include_tasks: configure-firewall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
RedHat:
- grafana-{{ grafana_version }}
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Recursively chown /etc/grafana (fix permissions)
file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
RedHat:
- java-1.8.0-openjdk-headless
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Set Kafka file name to install
set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
RedHat:
- opendistroforelasticsearch-kibana-{{ _kibana_version }}
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Update Kibana configuration file
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- samba-common
- nfs-utils
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Install Kubernetes packages
package:
Expand All @@ -35,4 +35,4 @@
- kubeadm-{{ specification.version }}-0
- kubernetes-cni-{{ specification.cni_version }}-0
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
RedHat:
- logstash-oss-{{ versions[ansible_os_family] }}
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Ensure Logstash is disabled
systemd:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- elasticsearch-oss-{{ versions[ansible_os_family].elasticsearch_oss }}
register: install_elasticsearch_package
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

# NOTE: Keep in mind compatibility matrix for Open Distro https://opendistro.github.io/for-elasticsearch-docs/docs/install/plugins/#plugin-compatibility
- name: Install opendistro-* packages
Expand All @@ -50,7 +50,7 @@
- opendistro-sql-{{ versions[ansible_os_family].opendistro }}
register: install_opendistro_packages
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Include configuration tasks
include_tasks: configure-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
block:
- include_tasks: "install-packages/{{ ansible_os_family }}.yml"
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Include configuration tasks
include_tasks: configure-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
yum:
list: installed
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Set SELinux in permissive mode until the machine is rebooted
command: setenforce 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# 'file /usr/bin/docker from install of docker-ce-cli-1:18.09.9-3.el7.x86_64 conflicts with file from package docker-ce-17.03.2.ce-1.el7.centos.x86_64'
- name: Remove Docker in version < 18.09 (RedHat)
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
block:
- name: Get information about installed packages as facts
package_facts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
disable_excludes: kubernetes
state: present
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
disable_excludes: kubernetes
state: present
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
disable_excludes: kubernetes
state: present
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
update_cache: true
state: absent
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
RedHat:
- java-1.8.0-openjdk-headless
module_defaults:
yum: { lock_timeout: 300 }
yum: { lock_timeout: "{{ yum_lock_timeout }}" }

- name: Check if jmx exporter is available
stat:
Expand Down

0 comments on commit c466035

Please sign in to comment.