|
@@ -13,20 +13,20 @@
|
|
|
# limitations under the License.
|
|
|
---
|
|
|
|
|
|
-- name: Check input config file is encrypted
|
|
|
- command: cat {{ input_config_filename }}
|
|
|
+- name: Check login_vars file is encrypted
|
|
|
+ command: cat {{ login_vars_filename }}
|
|
|
changed_when: false
|
|
|
register: config_content
|
|
|
|
|
|
-- name: Decrpyt appliance_config.yml
|
|
|
+- name: Decrpyt login_vars.yml
|
|
|
command: >-
|
|
|
- ansible-vault decrypt {{ input_config_filename }}
|
|
|
+ ansible-vault decrypt {{ login_vars_filename }}
|
|
|
--vault-password-file {{ vault_filename }}
|
|
|
changed_when: false
|
|
|
when: "'$ANSIBLE_VAULT;' in config_content.stdout"
|
|
|
|
|
|
-- name: Include variable file appliance_config.yml
|
|
|
- include_vars: "{{ input_config_filename }}"
|
|
|
+- name: Include variable file login_vars.yml
|
|
|
+ include_vars: "{{ login_vars_filename }}"
|
|
|
no_log: true
|
|
|
|
|
|
- name: Validate input parameters are not empty
|
|
@@ -35,95 +35,25 @@
|
|
|
register: input_config_check
|
|
|
when:
|
|
|
- provision_password | length < 1 or
|
|
|
- awx_password | length < 1 or
|
|
|
- hpc_nic | length < 1 or
|
|
|
- public_nic | length < 1 or
|
|
|
- iso_file_path | length < 1 or
|
|
|
- dhcp_start_ip_range | length < 1 or
|
|
|
- dhcp_end_ip_range | length < 1 or
|
|
|
- dhcp_gateway | length < 1 or
|
|
|
- dhcp_dns1 | length < 1 or
|
|
|
- dhcp_dns2 | length < 1 or
|
|
|
- timezone | length < 1 or
|
|
|
- ansible_config_file_path | length < 1
|
|
|
+ cobbler_password | length < 1 or
|
|
|
+ idrac_username | length < 1 or
|
|
|
+ idrac_password | length < 1
|
|
|
|
|
|
-- name: Save input variables from file
|
|
|
- set_fact:
|
|
|
- cobbler_password: "{{ provision_password }}"
|
|
|
- admin_password: "{{ awx_password }}"
|
|
|
- nic: "{{ hpc_nic }}"
|
|
|
- internet_nic: "{{ public_nic }}"
|
|
|
- path_for_iso_file: "{{ iso_file_path }}"
|
|
|
- dhcp_gateway: "{{ dhcp_gateway | ipv4 }}"
|
|
|
- dhcp_dns1: "{{ dhcp_dns1 | ipv4 }}"
|
|
|
- dhcp_dns2: "{{ dhcp_dns2 | ipv4 }}"
|
|
|
- dhcp_start_ip: "{{ dhcp_start_ip_range | ipv4 }}"
|
|
|
- dhcp_end_ip: "{{ dhcp_end_ip_range | ipv4 }}"
|
|
|
- mapping_file: false
|
|
|
- path_for_mapping_file: "{{ mapping_file_path }}"
|
|
|
- ks_timezone: "{{ timezone }}"
|
|
|
- ansible_conf_file_path: "{{ ansible_config_file_path }}"
|
|
|
+- name: Assert provision_password
|
|
|
+ assert:
|
|
|
+ that:
|
|
|
+ - provision_password | length > min_length | int - 1
|
|
|
+ - provision_password | length < max_length | int + 1
|
|
|
+ - '"-" not in provision_password '
|
|
|
+ - '"\\" not in provision_password '
|
|
|
+ - '"\"" not in provision_password '
|
|
|
+ - " \"'\" not in provision_password "
|
|
|
+ success_msg: "{{ success_msg_provision_password }}"
|
|
|
+ fail_msg: "{{ fail_msg_provision_password }}"
|
|
|
no_log: true
|
|
|
+ register: provision_password_check
|
|
|
|
|
|
-- 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
|
|
|
- changed_when: false
|
|
|
-
|
|
|
-- 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: Get the system hpc ip
|
|
|
- shell: "ifconfig {{ hpc_nic }} | grep 'inet' |cut -d: -f2 | awk '{ print $2}'"
|
|
|
- register: ip
|
|
|
- changed_when: false
|
|
|
-
|
|
|
-- name: Get the system public ip
|
|
|
- shell: "ifconfig {{ internet_nic }} | grep 'inet' |cut -d: -f2 | awk '{ print $2}'"
|
|
|
- register: internet_ip
|
|
|
- changed_when: false
|
|
|
-
|
|
|
-- name: Get the system netmask
|
|
|
- shell: "ifconfig {{ hpc_nic }} | grep 'inet' |cut -d: -f2 | awk '{ print $4}'"
|
|
|
- register: net
|
|
|
- changed_when: false
|
|
|
-
|
|
|
-- name: HPC nic IP
|
|
|
- set_fact:
|
|
|
- hpc_ip: "{{ ip.stdout }}"
|
|
|
- public_ip: "{{ internet_ip.stdout }}"
|
|
|
-
|
|
|
-- name: Netmask
|
|
|
- set_fact:
|
|
|
- netmask: "{{ net.stdout }}"
|
|
|
-
|
|
|
-- name: shell try
|
|
|
- shell: |
|
|
|
- IFS=. read -r i1 i2 i3 i4 <<< "{{ hpc_ip }}"
|
|
|
- IFS=. read -r m1 m2 m3 m4 <<< "{{ netmask }}"
|
|
|
- printf "%d.%d.%d.%d\n" "$((i1 & m1))" "$((i2 & m2))" "$((i3 & m3))" "$((i4 & m4))"
|
|
|
- register: sub_result
|
|
|
- changed_when: false
|
|
|
-
|
|
|
-- name: Subnet
|
|
|
- set_fact:
|
|
|
- subnet: "{{ sub_result.stdout }}"
|
|
|
-
|
|
|
-- name: Assert provision_password
|
|
|
+- name: Assert cobbler_password
|
|
|
assert:
|
|
|
that:
|
|
|
- cobbler_password | length > min_length | int - 1
|
|
@@ -132,160 +62,145 @@
|
|
|
- '"\\" not in cobbler_password '
|
|
|
- '"\"" not in cobbler_password '
|
|
|
- " \"'\" not in cobbler_password "
|
|
|
- success_msg: "{{ success_msg_provision_password }}"
|
|
|
- fail_msg: "{{ fail_msg_provision_password }}"
|
|
|
+ success_msg: "{{ success_msg_cobbler_password }}"
|
|
|
+ fail_msg: "{{ fail_msg_cobbler_password }}"
|
|
|
no_log: true
|
|
|
register: cobbler_password_check
|
|
|
|
|
|
-- name: Assert awx_password
|
|
|
+- name: Assert idrac_username
|
|
|
assert:
|
|
|
that:
|
|
|
- - admin_password | length > min_length | int - 1
|
|
|
- - admin_password | length < max_length | int + 1
|
|
|
- - '"-" not in admin_password '
|
|
|
- - '"\\" not in admin_password '
|
|
|
- - '"\"" not in admin_password '
|
|
|
- - " \"'\" not in admin_password "
|
|
|
- success_msg: "{{ success_msg_awx_password }}"
|
|
|
- fail_msg: "{{ fail_msg_awx_password }}"
|
|
|
+ - idrac_username | length >= min_username_length
|
|
|
+ - idrac_username | length < max_length
|
|
|
+ - '"-" not in idrac_username '
|
|
|
+ - '"\\" not in idrac_username '
|
|
|
+ - '"\"" not in idrac_username '
|
|
|
+ - " \"'\" not in idrac_username "
|
|
|
+ success_msg: "{{ success_idrac_username }}"
|
|
|
+ fail_msg: "{{ fail_idrac_username }}"
|
|
|
no_log: true
|
|
|
- register: awx_password_check
|
|
|
|
|
|
-- name: Assert hpc_ip
|
|
|
+- name: Assert idrac_password
|
|
|
assert:
|
|
|
that:
|
|
|
- - hpc_ip | length > 7
|
|
|
- success_msg: "{{ success_hpc_ip }}"
|
|
|
- fail_msg: "{{ fail_hpc_ip }}"
|
|
|
- register: hpc_ip_check
|
|
|
+ - idrac_password | length > min_username_length | int - 1
|
|
|
+ - idrac_password | length < max_length | int + 1
|
|
|
+ - '"-" not in idrac_password '
|
|
|
+ - '"\\" not in idrac_password '
|
|
|
+ - '"\"" not in idrac_password '
|
|
|
+ - " \"'\" not in idrac_password "
|
|
|
+ success_msg: "{{ success_msg_idrac_password }}"
|
|
|
+ fail_msg: "{{ fail_msg_idrac_password }}"
|
|
|
+ no_log: true
|
|
|
+ register: idrac_password_check
|
|
|
|
|
|
-- name: Assert public_ip
|
|
|
+- name: Verify ethernet_switch_username and ethernet_switch_password are not empty
|
|
|
assert:
|
|
|
that:
|
|
|
- - public_ip | length > 7
|
|
|
- success_msg: "{{ success_hpc_ip }}"
|
|
|
- fail_msg: "{{ fail_hpc_ip }}"
|
|
|
- register: public_ip_check
|
|
|
+ - ethernet_switch_username | length > 0
|
|
|
+ - ethernet_switch_password | length > 0
|
|
|
+ success_msg: "{{ ethernet_params_success_msg }}"
|
|
|
+ fail_msg: "{{ ethernet_params_empty_fail_msg }}"
|
|
|
+ when: ethernet_switch_support
|
|
|
|
|
|
-- name: Assert hpc_nic
|
|
|
+- name: Assert ethernet_switch_username
|
|
|
assert:
|
|
|
that:
|
|
|
- - nic | length > nic_min_length | int - 1
|
|
|
- - nic != internet_nic
|
|
|
- success_msg: "{{ success_msg_hpc_nic }}"
|
|
|
- fail_msg: "{{ fail_msg_hpc_nic }}"
|
|
|
- register: hpc_nic_check
|
|
|
-
|
|
|
-- name: Assert public_nic
|
|
|
+ - ethernet_switch_username | length >= min_username_length
|
|
|
+ - ethernet_switch_username | length < max_length
|
|
|
+ - '"-" not in ethernet_switch_username '
|
|
|
+ - '"\\" not in ethernet_switch_username '
|
|
|
+ - '"\"" not in ethernet_switch_username '
|
|
|
+ - " \"'\" not in ethernet_switch_username "
|
|
|
+ success_msg: "{{ success_ethernet_switch_username }}"
|
|
|
+ fail_msg: "{{ fail_ethernet_switch_username }}"
|
|
|
+ when: ethernet_switch_support
|
|
|
+
|
|
|
+- name: Assert ethernet_switch_password
|
|
|
assert:
|
|
|
that:
|
|
|
- - internet_nic | length > nic_min_length | int - 1
|
|
|
- - nic != internet_nic
|
|
|
- success_msg: "{{ success_msg_public_nic }}"
|
|
|
- fail_msg: "{{ fail_msg_public_nic }}"
|
|
|
- register: public_nic_check
|
|
|
+ - ethernet_switch_password | length > min_username_length | int - 1
|
|
|
+ - ethernet_switch_password | length < max_length | int + 1
|
|
|
+ - '"-" not in ethernet_switch_password '
|
|
|
+ - '"\\" not in ethernet_switch_password '
|
|
|
+ - '"\"" not in ethernet_switch_password '
|
|
|
+ - " \"'\" not in ethernet_switch_password "
|
|
|
+ success_msg: "{{ success_msg_ethernet_switch_password }}"
|
|
|
+ fail_msg: "{{ fail_msg_ethernet_switch_password }}"
|
|
|
+ when: ethernet_switch_support
|
|
|
+ no_log: true
|
|
|
|
|
|
-- name: Assert mapping_file_exists
|
|
|
+- name: Verify ib_username and ib_password are not empty
|
|
|
assert:
|
|
|
that:
|
|
|
- - "( mapping_file == true ) or ( mapping_file == false )"
|
|
|
- success_msg: "{{ success_mapping_file }}"
|
|
|
- fail_msg: "{{ fail_mapping_file }}"
|
|
|
-
|
|
|
-- name: Set the mapping file value
|
|
|
- set_fact:
|
|
|
- mapping_file: true
|
|
|
- when: path_for_mapping_file != ""
|
|
|
-
|
|
|
-- name: Assert valid mapping_file_path
|
|
|
- stat:
|
|
|
- path: "{{ path_for_mapping_file }}"
|
|
|
- when: mapping_file == true
|
|
|
- register: result_path_mapping_file
|
|
|
-
|
|
|
-- name : Valid mapping_file_path
|
|
|
- fail:
|
|
|
- msg: "{{ invalid_mapping_file_path }}"
|
|
|
- when: ( mapping_file == true ) and ( result_path_mapping_file.stat.exists == false )
|
|
|
-
|
|
|
-- name: Assert valid iso_file_path
|
|
|
- stat:
|
|
|
- path: "{{ path_for_iso_file }}"
|
|
|
- register: result_path_iso_file
|
|
|
-
|
|
|
-- name : Incorrect iso_file_path
|
|
|
- fail:
|
|
|
- msg: "{{ invalid_iso_file_path }}"
|
|
|
- when: ( result_path_iso_file.stat.exists == false ) and ( ".iso" not in path_for_iso_file )
|
|
|
-
|
|
|
-- name: Fail when iso path valid but image not right
|
|
|
- fail:
|
|
|
- msg: "{{ invalid_iso_file_path }}"
|
|
|
- when: ( result_path_iso_file.stat.exists == true ) and ( ".iso" not in path_for_iso_file )
|
|
|
-
|
|
|
-- name: Check the subnet of dhcp start range
|
|
|
- shell: |
|
|
|
- IFS=. read -r i1 i2 i3 i4 <<< "{{ dhcp_start_ip }}"
|
|
|
- IFS=. read -r m1 m2 m3 m4 <<< "{{ netmask }}"
|
|
|
- printf "%d.%d.%d.%d\n" "$((i1 & m1))" "$((i2 & m2))" "$((i3 & m3))" "$((i4 & m4))"
|
|
|
- args:
|
|
|
- warn: no
|
|
|
- register: dhcp_start_sub_result
|
|
|
- changed_when: false
|
|
|
- when: dhcp_start_ip != "false"
|
|
|
-
|
|
|
-- name: Set the start dhcp subnet
|
|
|
- set_fact:
|
|
|
- dhcp_start_sub: "{{ dhcp_start_sub_result.stdout }}"
|
|
|
- when: dhcp_start_ip != "false"
|
|
|
-
|
|
|
-- name: Check the subnet of dhcp end range
|
|
|
- shell: |
|
|
|
- IFS=. read -r i1 i2 i3 i4 <<< "{{ dhcp_end_ip }}"
|
|
|
- IFS=. read -r m1 m2 m3 m4 <<< "{{ netmask }}"
|
|
|
- printf "%d.%d.%d.%d\n" "$((i1 & m1))" "$((i2 & m2))" "$((i3 & m3))" "$((i4 & m4))"
|
|
|
- register: dhcp_end_sub_result
|
|
|
- when: dhcp_end_ip != "false"
|
|
|
- changed_when: false
|
|
|
+ - ib_username | length > 0
|
|
|
+ - ib_password | length > 0
|
|
|
+ success_msg: "{{ ib_params_success_msg }}"
|
|
|
+ fail_msg: "{{ ib_params_empty_fail_msg }}"
|
|
|
+ when: ib_switch_support
|
|
|
|
|
|
-- name: Set the end dhcp subnet
|
|
|
- set_fact:
|
|
|
- dhcp_end_sub: "{{ dhcp_end_sub_result.stdout }}"
|
|
|
- when: dhcp_end_ip != "false"
|
|
|
-
|
|
|
-- name: Assert dhcp_start_ip_range
|
|
|
+- name: Assert ib_username
|
|
|
assert:
|
|
|
that:
|
|
|
- - dhcp_start_ip != "false"
|
|
|
- - dhcp_start_ip != dhcp_end_ip
|
|
|
- - dhcp_start_sub == subnet
|
|
|
- - dhcp_start_sub == dhcp_end_sub
|
|
|
- success_msg: "{{ success_dhcp_range }}"
|
|
|
- fail_msg: "{{ fail_dhcp_range }}"
|
|
|
- register: dhcp_start_ip_check
|
|
|
-
|
|
|
-- name: Assert dhcp_end_ip_range
|
|
|
+ - ib_username | length >= min_username_length
|
|
|
+ - ib_username | length < max_length
|
|
|
+ - '"-" not in ib_username '
|
|
|
+ - '"\\" not in ib_username '
|
|
|
+ - '"\"" not in ib_username '
|
|
|
+ - " \"'\" not in ib_username "
|
|
|
+ success_msg: "{{ success_ib_username }}"
|
|
|
+ fail_msg: "{{ fail_ib_username }}"
|
|
|
+ when: ib_switch_support
|
|
|
+
|
|
|
+- name: Assert ib_password
|
|
|
assert:
|
|
|
that:
|
|
|
- - dhcp_end_ip != "false"
|
|
|
- - dhcp_start_ip != dhcp_end_ip
|
|
|
- - dhcp_end_sub == subnet
|
|
|
- - dhcp_start_sub == dhcp_end_sub
|
|
|
- success_msg: "{{ success_dhcp_range }}"
|
|
|
- fail_msg: "{{ fail_dhcp_range }}"
|
|
|
- register: dhcp_end_ip_check
|
|
|
+ - ib_password | length > min_username_length | int - 1
|
|
|
+ - ib_password | length < max_length | int + 1
|
|
|
+ - '"-" not in ib_password '
|
|
|
+ - '"\\" not in ib_password '
|
|
|
+ - '"\"" not in ib_password '
|
|
|
+ - " \"'\" not in ib_password "
|
|
|
+ success_msg: "{{ success_msg_ib_password }}"
|
|
|
+ fail_msg: "{{ fail_msg_ib_password }}"
|
|
|
+ when: ib_switch_support
|
|
|
+ no_log: true
|
|
|
|
|
|
-- name: Check timezone file
|
|
|
- command: grep -Fx "{{ ks_timezone }}" {{ role_path }}/files/timezone.txt
|
|
|
- ignore_errors: yes
|
|
|
- register: timezone_out
|
|
|
+- name: Verify powervault_me4_username and powervault_me4_password are not empty
|
|
|
+ assert:
|
|
|
+ that:
|
|
|
+ - powervault_me4_username | length > 0
|
|
|
+ - powervault_me4_password | length > 0
|
|
|
+ success_msg: "{{ pv_params_success_msg }}"
|
|
|
+ fail_msg: "{{ pv_params_empty_fail_msg }}"
|
|
|
+ when: powervault_support
|
|
|
|
|
|
-- name: Assert timezone
|
|
|
+- name: Assert powervault_me4_username
|
|
|
assert:
|
|
|
- that: ks_timezone in timezone_out.stdout
|
|
|
- success_msg: "{{ success_timezone }}"
|
|
|
- fail_msg: "{{ fail_timezone }}"
|
|
|
- register: timezone_check
|
|
|
+ that:
|
|
|
+ - powervault_me4_username | length >= min_username_length
|
|
|
+ - powervault_me4_username | length < max_length
|
|
|
+ - '"-" not in powervault_me4_username '
|
|
|
+ - '"\\" not in powervault_me4_username '
|
|
|
+ - '"\"" not in powervault_me4_username '
|
|
|
+ - " \"'\" not in powervault_me4_username "
|
|
|
+ success_msg: "{{ success_powervault_me4_username }}"
|
|
|
+ fail_msg: "{{ fail_powervault_me4_username }}"
|
|
|
+ when: powervault_support
|
|
|
+
|
|
|
+- name: Assert powervault_me4_password
|
|
|
+ assert:
|
|
|
+ that:
|
|
|
+ - powervault_me4_password | length > min_username_length | int - 1
|
|
|
+ - powervault_me4_password | length < max_length | int + 1
|
|
|
+ - '"-" not in powervault_me4_password '
|
|
|
+ - '"\\" not in powervault_me4_password '
|
|
|
+ - '"\"" not in powervault_me4_password '
|
|
|
+ - " \"'\" not in powervault_me4_password "
|
|
|
+ success_msg: "{{ success_msg_powervault_me4_password }}"
|
|
|
+ fail_msg: "{{ fail_msg_powervault_me4_password }}"
|
|
|
+ when: powervault_support
|
|
|
+ no_log: true
|
|
|
|
|
|
- name: Create ansible vault key
|
|
|
set_fact:
|
|
@@ -299,83 +214,11 @@
|
|
|
{{ vault_key }}
|
|
|
owner: root
|
|
|
force: yes
|
|
|
+ mode: "{{ vault_file_perm }}"
|
|
|
when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
|
|
|
|
|
|
- name: Encrypt input config file
|
|
|
command: >-
|
|
|
- ansible-vault encrypt {{ input_config_filename }}
|
|
|
+ ansible-vault encrypt {{ login_vars_filename }}
|
|
|
--vault-password-file {{ vault_filename }}
|
|
|
- changed_when: false
|
|
|
-
|
|
|
-- name: Check if omnia_vault_key exists
|
|
|
- stat:
|
|
|
- path: "{{ role_path }}/../../../{{ config_vaultname }}"
|
|
|
- register: vault_key_result
|
|
|
-
|
|
|
-- name: Create ansible vault key if it does not exist
|
|
|
- set_fact:
|
|
|
- vault_key: "{{ lookup('password', '/dev/null chars=ascii_letters') }}"
|
|
|
- when: not vault_key_result.stat.exists
|
|
|
-
|
|
|
-- name: Save vault key
|
|
|
- copy:
|
|
|
- dest: "{{ role_path }}/../../../{{ config_vaultname }}"
|
|
|
- content: |
|
|
|
- {{ vault_key }}
|
|
|
- owner: root
|
|
|
- force: yes
|
|
|
- when: not vault_key_result.stat.exists
|
|
|
-
|
|
|
-- name: Check if omnia config file is encrypted
|
|
|
- command: cat {{ role_path }}/../../../{{ config_filename }}
|
|
|
- changed_when: false
|
|
|
- register: config_content
|
|
|
- no_log: True
|
|
|
-
|
|
|
-- name: Decrpyt omnia_config.yml
|
|
|
- command: >-
|
|
|
- ansible-vault decrypt {{ role_path }}/../../../{{ config_filename }}
|
|
|
- --vault-password-file {{ role_path }}/../../../{{ config_vaultname }}
|
|
|
- when: "'$ANSIBLE_VAULT;' in config_content.stdout"
|
|
|
-
|
|
|
-- name: Include variable file omnia_config.yml
|
|
|
- include_vars: "{{ role_path }}/../../../{{ config_filename }}"
|
|
|
- no_log: True
|
|
|
-
|
|
|
-- name: Validate input parameters are not empty
|
|
|
- fail:
|
|
|
- msg: "{{ input_config_failure_msg }}"
|
|
|
- register: input_config_check
|
|
|
- when:
|
|
|
- - mariadb_password | length < 1 or
|
|
|
- k8s_cni | length < 1
|
|
|
-
|
|
|
-- 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 "
|
|
|
- success_msg: "{{ success_msg_mariadb_password }}"
|
|
|
- fail_msg: "{{ fail_msg_mariadb_password }}"
|
|
|
-
|
|
|
-- name: Assert kubernetes cni
|
|
|
- assert:
|
|
|
- that: "('calico' in k8s_cni) or ('flannel' in k8s_cni)"
|
|
|
- success_msg: "{{ success_msg_k8s_cni }}"
|
|
|
- fail_msg: "{{ fail_msg_k8s_cni }}"
|
|
|
-
|
|
|
-- name: Save input variables from file
|
|
|
- set_fact:
|
|
|
- db_password: "{{ mariadb_password }}"
|
|
|
- k8s_cni: "{{ k8s_cni }}"
|
|
|
- no_log: True
|
|
|
-
|
|
|
-- name: Encrypt input config file
|
|
|
- command: >-
|
|
|
- ansible-vault encrypt {{ role_path }}/../../../{{ config_filename }}
|
|
|
- --vault-password-file {{ role_path }}/../../../{{ config_vaultname }}
|
|
|
changed_when: false
|