|
@@ -1,4 +1,4 @@
|
|
|
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
|
|
|
+# Copyright 2021 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.
|
|
@@ -12,6 +12,7 @@
|
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
|
---
|
|
|
+
|
|
|
- name: Check if omnia_vault_key exists
|
|
|
stat:
|
|
|
path: "{{ role_path }}/../../{{ config_vaultname }}"
|
|
@@ -72,12 +73,12 @@
|
|
|
- name: Assert mariadb_password
|
|
|
assert:
|
|
|
that:
|
|
|
- - mariadb_password | length > min_length | int - 1
|
|
|
- - mariadb_password | length < max_length | int + 1
|
|
|
- - '"-" not in mariadb_password '
|
|
|
- - '"\\" not in mariadb_password '
|
|
|
- - '"\"" not in mariadb_password '
|
|
|
- - " \"'\" not in mariadb_password "
|
|
|
+ - mariadb_password | length > min_length | int - 1
|
|
|
+ - mariadb_password | length < max_length | int + 1
|
|
|
+ - '"-" not in mariadb_password '
|
|
|
+ - '"\\" not in mariadb_password '
|
|
|
+ - '"\"" not in mariadb_password '
|
|
|
+ - " \"'\" not in mariadb_password "
|
|
|
success_msg: "{{ success_msg_mariadb_password }}"
|
|
|
fail_msg: "{{ fail_msg_mariadb_password }}"
|
|
|
|
|
@@ -89,7 +90,8 @@
|
|
|
|
|
|
- name: Assert kubernetes cni
|
|
|
assert:
|
|
|
- that: "('calico' in k8s_cni) or ('flannel' in k8s_cni)"
|
|
|
+ that:
|
|
|
+ - "('calico' in k8s_cni) or ('flannel' in k8s_cni)"
|
|
|
success_msg: "{{ success_msg_k8s_cni }}"
|
|
|
fail_msg: "{{ fail_msg_k8s_cni }}"
|
|
|
|
|
@@ -112,38 +114,10 @@
|
|
|
ansible_conf_file_path: "{{ ansible_config_file_path }}"
|
|
|
no_log: True
|
|
|
|
|
|
-- name: Check whether ansible config file exists
|
|
|
- stat:
|
|
|
- path: "{{ ansible_conf_file_path }}/ansible.cfg"
|
|
|
- register: ansible_conf_exists
|
|
|
-
|
|
|
-- name: Create the directory if it does not exist
|
|
|
- file:
|
|
|
- path: "{{ ansible_conf_file_path }}"
|
|
|
- state: directory
|
|
|
- mode: "{{ file_perm }}"
|
|
|
- when: not ansible_conf_exists.stat.exists
|
|
|
-
|
|
|
-- name: Create ansible config file if it does not exist
|
|
|
- copy:
|
|
|
- dest: "{{ ansible_conf_file_path }}/ansible.cfg"
|
|
|
- mode: "{{ file_perm }}"
|
|
|
- content: |
|
|
|
- [defaults]
|
|
|
- log_path = /var/log/omnia.log
|
|
|
- when: not ansible_conf_exists.stat.exists
|
|
|
-
|
|
|
-- name: Set omnia.log file
|
|
|
- replace:
|
|
|
- path: "{{ ansible_conf_file_path }}/ansible.cfg"
|
|
|
- regexp: '#log_path = /var/log/ansible.log'
|
|
|
- replace: 'log_path = /var/log/omnia.log'
|
|
|
- when: ansible_conf_exists.stat.exists
|
|
|
-
|
|
|
- name: Verify the value of login_node_required
|
|
|
assert:
|
|
|
that:
|
|
|
- - 'login_node_required | type_debug == "bool"'
|
|
|
+ - login_node_required == true or login_node_required == false
|
|
|
success_msg: "{{ login_node_required_success_msg }}"
|
|
|
fail_msg: "{{ login_node_required_fail_msg }}"
|
|
|
|