#  Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
---

- name: Pre-requisite validation
  import_tasks: pre_requisite.yml

- name: Internet validation
  import_tasks: internet_validation.yml
  tags: init

- name: Common packages installation
  import_tasks: package_installation.yml
  tags: init

- name: Basic configuration
  import_tasks: fetch_base_inputs.yml

- name: Omnia inputs validation
  import_tasks: verify_omnia_params.yml

- name: Credentials inputs validation
  import_tasks: verify_login_inputs.yml

- name: iDRAC inputs validation
  import_tasks: validate_idrac_vars.yml

- name: Subnet manager inputs validation
  import_tasks: fetch_sm_inputs.yml
  when: ib_switch_support

- name: Security inputs validation
  import_tasks: fetch_security_inputs.yml
  when: enable_security_support

- name: Host mapping file validation
  import_tasks: validate_host_mapping_file.yml
  when: host_mapping_file_path | length > 0
  tags: [ validate, pxe ]

- name: Device mapping file validation
  import_tasks: validate_device_mapping_file.yml
  when: mngmnt_mapping_file_path | length > 0
  tags: [ validate, network-device ]

- name: Encrypt idrac_tools_vars.yml
  import_tasks: encrypt_idrac_tools_vars.yml
  tags: init

- name: NFS Server setup for offline repo and awx
  import_tasks: nfs_server_setup.yml
  tags: init