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