refactor(standardize): remove redundant variables, deduplicate conditionals
This commit is contained in:
@@ -16,8 +16,6 @@ method=auto
|
||||
{% endif %}
|
||||
{% if idx | int == 0 and dns_list %}
|
||||
dns={{ dns_list | join(';') }}
|
||||
{% endif %}
|
||||
{% if idx | int == 0 and dns_list %}
|
||||
ignore-auto-dns=true
|
||||
{% endif %}
|
||||
{% if idx | int == 0 and search_list %}
|
||||
|
||||
@@ -208,11 +208,6 @@
|
||||
- name: Configure RHEL Repos for installation
|
||||
when: is_rhel | bool
|
||||
block:
|
||||
- name: Select repository template
|
||||
ansible.builtin.set_fact:
|
||||
environment_repo_template: "{{ os | lower }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Create directories for repository files and RPM GPG keys
|
||||
ansible.builtin.file:
|
||||
path: /etc/yum.repos.d
|
||||
@@ -221,8 +216,8 @@
|
||||
|
||||
- name: Create RHEL repository file
|
||||
ansible.builtin.template:
|
||||
src: "{{ environment_repo_template }}.repo.j2"
|
||||
dest: /etc/yum.repos.d/{{ environment_repo_template }}.repo
|
||||
src: "{{ os }}.repo.j2"
|
||||
dest: /etc/yum.repos.d/{{ os }}.repo
|
||||
mode: "0644"
|
||||
|
||||
- name: Check for third-party preparation tasks
|
||||
@@ -252,9 +247,4 @@
|
||||
when:
|
||||
- thirdparty_preparation_tasks_path | length > 0
|
||||
- environment_thirdparty_tasks_stat.stat.exists
|
||||
ansible.builtin.include_tasks: >-
|
||||
{{
|
||||
thirdparty_preparation_tasks_path
|
||||
if thirdparty_preparation_tasks_path | regex_search('^/')
|
||||
else playbook_dir + '/' + thirdparty_preparation_tasks_path
|
||||
}}
|
||||
ansible.builtin.include_tasks: "{{ environment_thirdparty_tasks_path }}"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
ansible.builtin.set_fact:
|
||||
system: "{{ system | default({}) }}"
|
||||
|
||||
|
||||
- name: Validate system input types
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
|
||||
Reference in New Issue
Block a user