main.yml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. # Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. # vars file for control_plane_common
  16. # Usage: package_installation.yml
  17. common_packages:
  18. - git
  19. - gcc
  20. - gcc-c++
  21. - nodejs
  22. - bzip2
  23. - python2-pip
  24. - python3-pip
  25. - nano
  26. - lvm2
  27. - gettext
  28. - net-tools
  29. - python3-netaddr
  30. - dos2unix
  31. - make
  32. os_supported_leap: "leap"
  33. os_supported_leap_version: "15.3"
  34. python_version_leap: '3.6.13'
  35. common_packages_rocky:
  36. - epel-release
  37. - yum-utils
  38. - device-mapper-persistent-data
  39. - yum-plugin-versionlock
  40. # Usage: set_docker_os.yml
  41. docker_rocky_os_version: "8"
  42. docker_leap_os_version: "15.3"
  43. docker_alpine_os_version: "3.15"
  44. cobbler_rocky_dockerfile_path: "{{ playbook_dir }}/roles/provision_cobbler/files/Dockerfile_rocky"
  45. cobbler_leap_dockerfile_path: "{{ playbook_dir }}/roles/provision_cobbler/files/Dockerfile_leap"
  46. ib_dockerfile_path: "{{ playbook_dir }}/roles/control_plane_ib/files/Dockerfile"
  47. mgmnt_dockerfile_path: "{{ playbook_dir }}/roles/control_plane_device/files/Dockerfile"
  48. # Usage: pre_requisite.yml
  49. internet_delay: 0
  50. internet_timeout: 10
  51. hostname: github.com
  52. port_no: 22
  53. os_supported_centos: "centos"
  54. os_supported_rocky: "rocky"
  55. os_supported_centos_version: "8.3"
  56. os_supported_rocky_version: "8.4"
  57. fail_os_status: "Unsupported OS or OS version. OS should be {{ os_supported_centos }} {{ os_supported_centos_version }} or {{ os_supported_rocky }} {{ os_supported_rocky_version }} or {{ os_supported_leap }} {{ os_supported_leap_version }}"
  58. success_os_status: "Management Station OS validated"
  59. internet_status: "Failed. No Internet connection. Make sure network is up."
  60. selinux_warning: "Warning! SELinux status is disabled by user. No SELinux policy is loaded"
  61. ansible_python_version_status: "For {{ mgmt_os }} {{ ansible_distribution_version }}, python bindings of firewalld, dnf, selinux are not available if python is installed from source and not from dnf or zypper. So please make sure python3.6 is installed using dnf or zypper. And ansible uses the python version 3.6 installed using dnf or zypper"
  62. python_version_support: '3.6.8'
  63. default_ansible_config_file_path: /etc/ansible/ansible.cfg
  64. invalid_run_tag_msg: "Failed. init tag should be used with run tags"
  65. invalid_skip_tag_msg: "Failed. init tag can't be used with skip tags"
  66. # Usage: verify_login_inputs.yml
  67. login_vars_filename: "input_params/login_vars.yml"
  68. vault_filename: input_params/.login_vault_key
  69. min_length: 8
  70. max_length: 30
  71. min_username_length: 4
  72. min_length_grafana: 5
  73. file_perm: '0755'
  74. vault_file_perm: '0644'
  75. mount_dir_perm: '0775'
  76. nic_min_length: 3
  77. login_input_config_failure_msg: "Failed. Please provide all the required parameters in login_vars.yml"
  78. fail_msg_provision_password: "Failed. Incorrect provision_password format provided in login_vars.yml"
  79. fail_msg_cobbler_password: "Failed. Incorrect cobbler_password format provided in login_vars.yml file"
  80. fail_msg_idrac_credentials: "Failed. Incorrect idrac_username or idrac_password format provided in login_vars.yml"
  81. fail_msg_grafana_credentials: "Failed. Incorrect grafana_username or grafana_password format provided in login_vars.yml"
  82. fail_msg_ethernet_credentials: "Failed. Incorrect ethernet_switch_username or ethernet_switch_password format provided in login_vars.yml"
  83. fail_msg_ib_credentials: "Failed. Incorrect ib_username or ib_password format provided in login_vars.yml"
  84. fail_msg_me4_credentials: "Failed. Incorrect powervault_me4_username or powervault_me4_password format provided in login_vars.yml"
  85. login_security_config_failure_msg: "Failed. Please provide the required passwords in login_vars.yml for installing ipa"
  86. success_msg_dir_manager_password: "ms_directory_manager_password successfully validated"
  87. fail_msg_dir_manager_password: "Failed. Incorrect format provided for ms_directory_manager_password"
  88. success_msg_ipa_admin_pwd: "ms_kerberos_admin_password successfully validated"
  89. fail_msg_ipa_admin_pwd: "Failed. Incorrect format provided for ms_kerberos_admin_password"
  90. # Usage: verify_omnia_params.yml
  91. config_filename: "omnia_config.yml"
  92. config_vaultname: .omnia_vault_key
  93. input_omnia_failure_msg: "Please provide all the required parameters in omnia_config.yml"
  94. fail_msg_mariadb_password: "Failed. Incorrect mariadb_password format provided in omnia_config.yml file"
  95. success_msg_mariadb_password: "mariadb_password validated"
  96. success_msg_k8s_version: "Kubernetes Version Validated"
  97. fail_msg_k8s_version: "Failed. Kubernetes Version is unsupported or incorrect in omnia_config.yml"
  98. success_msg_k8s_cni: "Kubernetes CNI Validated"
  99. fail_msg_k8s_cni: "Failed. Kubernetes CNI is incorrect in omnia_config.yml"
  100. domain_name_success_msg: "domain name successfully validated"
  101. domain_name_fail_msg: "Failed. Incorrect format provided for domain name in omnia_config.yml"
  102. realm_name_success_msg: "realm_name successfully validated"
  103. realm_name_fail_msg: "Failed. Incorrect realm_name formate in omnia_config.yml"
  104. success_msg_directory_manager_password: "directory_manager_password successfully validated"
  105. fail_msg_directory_manager_password: "Failed. Incorrect format provided for directory_manager_password"
  106. success_msg_kerberos_admin_password: "kerberos_admin_password successfully validated"
  107. fail_msg_kerberos_admin_password: "Failed. Incorrect format provided for kerberos_admin_password"
  108. omnia_input_config_failure_msg: "Failed. Please provide all the required parameters in omnia_config.yml for for login_node"
  109. login_node_required_success_msg: "login_node_required successfully validated"
  110. login_node_required_fail_msg: "Failed. login_node_required should be either true or false"
  111. secure_login_node_success_msg: "enable_secure_login_node successfully validated"
  112. secure_login_node_fail_msg: "Failed. enable_secure_login_node should be either true or false"
  113. # Usage: fetch_base_inputs.yml
  114. base_vars_filename: "input_params/base_vars.yml"
  115. input_base_failure_msg: "Please provide all the required parameters in base_vars.yml"
  116. success_snmp_trap_dest: "SNMP trap destination IP validated"
  117. fail_snmp_trap_dest: "Failed. Incorrect SNMP trap destination IP format provided in base_address.yml"
  118. success_snmp_comm_msg: "SNMP community string validated"
  119. fail_snmp_comm_msg: "snmp community string cannoy be blank in base_vars.yml"
  120. success_msg_public_nic: "Public nic successfully validated"
  121. fail_msg_public_nic: "Failed. Incorrect public nic provided in base_vars.yml"
  122. success_msg_k8s_pod_network_cidr: "Appliance k8s pod network cidr validated"
  123. fail_msg_k8s_pod_network_cidr: "Failed. Incorrect appliance k8s pod network cidr provided in base_vars.yml"
  124. success_awx_organization: "awx organization validated"
  125. success_provision_method: "Provision method validated"
  126. fail_provision_method: "Failed. provision_method can either be set to idrac or PXE"
  127. fail_awx_organization: "Failed. Incorrect format in awx organization"
  128. success_timezone_msg: "timezone validated"
  129. fail_timezone_msg: "Failed. Incorrect timezone provided. Please check the file timezone.txt in control_plane/roles/control_plane_common/files/ folder"
  130. fail_language: "Failed. Only en-US(english) language supported"
  131. invalid_iso_file_path: "Invalid iso_file_path provided in base_vars.yml. Make sure iso_file_path contains value mentioned in provision_os."
  132. missing_iso_file_path: "Incorrect iso_file_path provided in base_vars.yml. Make sure iso file is present in the provided iso_file_path."
  133. valid_iso_file_path: "iso_file_path validated"
  134. ethernet_switch_support_success_msg: "ethernet_switch_support validated"
  135. ethernet_switch_support_fail_msg: "Failed. ethernet_switch_support only accepts boolean values true or false"
  136. ib_switch_support_success_msg: "ib_switch_support validated"
  137. ib_switch_support_fail_msg: "Failed. ib_switch_support only accepts boolean values true or false"
  138. powervault_support_success_msg: "powervault_support validated"
  139. powervault_support_fail_msg: "Failed. power_vault_support only accepts boolean values true or false"
  140. success_msg_mngmnt_network_nic: "Management network nic successfully validated"
  141. fail_msg_mngmnt_network_nic: "Failed. Incorrect Management network nic provided in base_vars.yml"
  142. success_msg_host_network_nic: "Host network nic successfully validated"
  143. fail_msg_host_network_nic: "Failed. Incorrect host network nic provided in base_vars.yml"
  144. success_msg_ib_network_nic: "Infiniband network nic successfully validated"
  145. fail_msg_ib_network_nic: "Failed. Incorrect infiniband network nic provided in base_vars.yml"
  146. success_dhcp_range: "Dhcp_range validated"
  147. fail_dhcp_range: "Failed. Incorrect range assigned for dhcp"
  148. invalid_mapping_file_path: "Incorrect mapping_file_path provided in base_vars.yml"
  149. success_msg_different_nics: "The nics of different containers and public nic are not the same - Validated"
  150. fail_msg_different_nics: "Failed. Incorrect nic information. public nic, management network nic and host network nic should not be the same"
  151. success_msg_different_nics_ib: "The nics of different containers and public nic are not the same as infiniband nic- Validated"
  152. fail_msg_different_nics_ib: "Failed. Infiniband nic cannot be the same as other nics"
  153. success_msg_lease_time: "Default lease time validated"
  154. fail_msg_lease_time: "Failed. Please provide a valid default lease time"
  155. provision_os_success_msg: "provision_os validated"
  156. provision_os_fail_msg: "Failed. Incorrect provision_os selected. Supported OS are {{ os_supported_centos }} or {{ os_supported_rocky }}"
  157. provision_state_success_msg: "provision_state validated"
  158. provision_state_fail_msg: "Failed. Incorrect provision_state selected. Supported only stateful"
  159. enable_security_support_success_msg: "enable_security_support validated"
  160. enable_security_support_fail_msg: "Failed. enable_security_support only accepts boolean values true or false"
  161. dns_empty_warning_msg: "[WARNING] primary_dns and secondary_dns is empty. DHCP routing in compute nodes for internet access won't be configured. Stop and re-run control_plane.yml, if DHCP routing is required."
  162. primary_dns_empty_msg: "primary_dns is empty and secondary_dns provided. If one dns entry present, provide primary_dns only."
  163. primary_dns_success_msg: "primary_dns successfully validated"
  164. primary_dns_fail_msg: "Failed. Incorrect primary_dns provided in base_vars.yml"
  165. primary_dns_not_reachable_msg: "Failed. primary_dns is not reachable. Provide valid dns"
  166. secondary_dns_success_msg: "secondary_dns successfully validated"
  167. secondary_dns_fail_msg: "Failed. Incorrect secondary_dns provided in base_vars.yml"
  168. secondary_dns_not_reachable_msg: "[WARNING] secondary_dns is not reachable"
  169. ping_search_key: "100% packet loss"
  170. success_device_config: " Success. Device_config_support has valid values"
  171. fail_device_config: "Failed. Give a valid value in device_config_support"
  172. device_ip_list_not_supported: "[Warning] Device_ip_list is invalid as minimum idrac_support should be true"
  173. mgmnt_device_fail: "Failed. Container already present. Either delete the container or make device_config_support as true"
  174. # Usage: ip_metric.yml
  175. public_metric: 101
  176. mngmnt_metric: 102
  177. host_metric: 103
  178. ib_metric: 150
  179. # Usage: device_config_validations
  180. success_msg_ib: "Infiniband variables validated"
  181. fail_msg_ib: "Failed. Please provide all the InfiniBand related parameters in base_vars.yml"
  182. ethernet_device_config: " Ethernet_switch_support will be set to false only since device_config_support is set to false"
  183. ib_device_config: " Ib_switch_support will be set to false only since device_config_support is set to false"
  184. pv_device_config: " Powervault_support will be set to false only since device_config_support is set to false"
  185. idrac_support_valid: "Idrac support is initiated."
  186. failed_idrac_support: " Failed. Atleast idrac_support should be true."
  187. # Usage: fetch_sm_inputs.yml
  188. ib_config_file: "{{ role_path }}/../../input_params/ib_vars.yml"
  189. opensm_conf_file: "{{ role_path }}/../../input_params/opensm.conf"
  190. fail_msg_config_file: ib_vars.yml file doesn't exist.
  191. fail_msg_opensm_config_file: opensm.conf file doesn't exist.
  192. fail_msg_ib_input_definition: Infiniband config directories must be defined.
  193. fail_msg_ib_input: Infiniband config directories can't be left empty.
  194. # Usage: encrypt_idrac_2fa_vars.yml
  195. idrac_tools_vaultname: input_params/.idrac_vault_key
  196. idrac_tools_vars_filename: input_params/idrac_tools_vars.yml
  197. # Usage: nfs_server_setup.yml
  198. nfs_share_offline_repo: /var/nfs_repo
  199. nfs_share_awx: /var/nfs_awx
  200. nfs_share_dir_mode: 0777
  201. exports_file_path: /etc/exports
  202. nfs_services:
  203. - mountd
  204. - rpc-bind
  205. - nfs
  206. # Usage: validate_host_mapping_file.yml
  207. fail_msg_mapping_file: "Mapping file doesn't exist at given path: "
  208. mapping_file_key: "MAC"
  209. fail_mapping_file_header: "Header of csv file is not in correct format.
  210. It should be of the format: MAC,Hostname,IP,Component_role or MAC,Hostname,IP"
  211. host_mapping_header_format: "MAC,Hostname,IP"
  212. host_mapping_header_with_role_format: "MAC,Hostname,IP,Component_role"
  213. fail_mapping_file_field_seperation: "Failed: Mapping file should be comma separated and all fields must be filled."
  214. fail_mapping_file_duplicate_ip: "Failed: Duplicate ip exists. Please verify following mapping file again: "
  215. fail_mapping_file_duplicate_hostname: "Failed: Duplicate hostname exists. Please verify host mapping file again."
  216. fail_mapping_file_hostname_chars: "Hostname should not contain _ or . or space as it will cause error with slurm and K8s. Found in: "
  217. fail_mapping_file_roles_error: "Failed. Define correct Component Roles for each node.
  218. Component roles can only take values: {{ group_name_manager }}, {{group_name_compute}},
  219. {{ group_name_login }}, {{ group_name_nfs }}"
  220. fail_mapping_file_manager_role: "Exactly 1 manager node must be defined"
  221. fail_mapping_file_compute_role: "Atleast 1 compute node must be defined"
  222. fail_mapping_file_login_role: "Exactly 1 login node must be defined or login_node_required must be true in omnia_config.yml"
  223. fail_mapping_file_nfs_role: "Exactly 1 nfs node must be defined or powervault_support must be true in base_vars.yml"
  224. count_of_roles_defined: "Component Roles defined: Manager Node: {{ count_of_manager }},
  225. Compute Nodes: {{ count_of_compute }}, Login Node: {{ count_of_login }},
  226. Nfs Node: {{ count_of_nfs_node }}, Total Nodes: {{ count_total_items }} "
  227. group_name_manager: "manager"
  228. group_name_compute: "compute"
  229. group_name_login: "login_node"
  230. group_name_nfs: "nfs_node"
  231. # Usage: validate_device_mapping_file.yml
  232. fail_device_mapping_file_header: "Failed: Header (MAC,IP) should be present in the mapping file."
  233. device_mapping_header_format: "MAC,IP"
  234. # Usage: fetch_security_inputs.yml
  235. security_vars_filename: "input_params/security_vars.yml"
  236. input_security_failure_msg: "Please provide all the required parameters in security_vars.yml"
  237. dom_name_length: '63'
  238. dom_name_success_msg: "domain name successfully validated"
  239. dom_name_fail_msg: "Failed. Incorrect format provided for domain name in security_vars.yml"
  240. realm_success_msg: "realm_name successfully validated"
  241. realm_fail_msg: "Failed. Incorrect realm_name format in security_vars.yml"
  242. domain_name_blank_msg: "Failed. Domain name is not set in hostname It should have hostname.domain_name format"
  243. server_domain_name_success: "Domain name in server hostname validated"
  244. server_domain_name_fail: "Failed. Domain name set is not same as domain name in security_vars.yml"
  245. hosts_file_path: /etc/hosts
  246. hosts_file_mode: "0644"
  247. hostname_blank_msg: "Failed. Domain name is not set in hostname or missing entries in /etc/hosts. It should have hostname.domain_name format."
  248. server_hostname_success: "Hostname in server hostname validated"
  249. server_hostname_fail: "Failed. Hostname set is not valid"
  250. max_failures_success_msg: "max_failures successfully validated"
  251. max_failures_fail_msg: "Failed. Incorrect max_failures value in security_vars.yml"
  252. failure_reset_interval_success_msg: "failure_reset_interval successfully validated"
  253. failure_reset_interval_fail_msg: "Failed. Incorrect failure_reset_interval value in security_vars.yml"
  254. lockout_duration_success_msg: "lockout_duration successfully validated"
  255. lockout_duration_fail_msg: "Failed. Incorrect lockout_duration value in security_vars.yml"
  256. session_timeout_success_msg: "session_timeout successfully validated"
  257. session_timeout_fail_msg: "Failed. Incorrect session_timeout value in security_vars.yml"
  258. max_failures_default_value: 3
  259. failure_reset_interval_min_value: 30
  260. failure_reset_interval_max_value: 60
  261. lockout_duration_min_value: 5
  262. lockout_duration_max_value: 10
  263. session_timeout_min_value: 90
  264. session_timeout_max_value: 180
  265. alert_email_success_msg: "alert_email_address successfully validated"
  266. alert_email_fail_msg: "Failed. Incorrect alert_email_address value in security_vars.yml"
  267. alert_email_warning_msg: "[WARNING] alert_email_address is empty. Authentication failure alerts won't be configured."
  268. email_max_length: 320
  269. email_search_key: "@"
  270. user_success_msg: "user successfully validated"
  271. user_fail_msg: "Failed. Incorrect user format in security_vars.yml"
  272. allow_deny_success_msg: "Access successfully validated"
  273. allow_deny_fail_msg: "Failed. Incorrect Access format in security_vars.yml"
  274. restrict_program_support_success_msg: "restrict_program_support successfully validated"
  275. restrict_program_support_failure_msg: "Failed. Accepted values are true or false."
  276. restrict_softwares_success_msg: "restrict_softwares successfully validated"
  277. restrict_softwares_failure_msg: "Warning. Values should be comma separated. The supported services are telnet, lpd, bluetooth, rlogin, rexec. Please check restrict_softwares variable"
  278. # Usage: validate_idrac_vars.yml
  279. idrac_input_filename: input_params/idrac_vars.yml
  280. firmware_update_success_msg: "firmware_update_required validated"
  281. firmware_update_fail_msg: "Failed. firmware_update_required accepts only true or false in idrac_vars.yml"
  282. poweredge_model_success_msg: "poweredge_model validated"
  283. poweredge_model_fail_msg: "Failed. poweredge_model is incorrect or unsupported. Please update the list with the supported models in the correct format"
  284. # Usage: validate_device_ip_file.yml
  285. fail_device_ip_format: "Failed.Incorrect file format. File should only contain IPs"
  286. success_device_ip_format: "File is correct"
  287. mgmnt_ip_path: "{{ role_path}}/../collect_device_info/files/mgmt_provisioned_hosts.yml"