Tee Ngo f3e3de7cdc Rename playbookconfig folder to src
Rename "playbookconfig" directory to "src" to be consistent with the
direction of StarlingX/MultiOS.

Tests:
  Successfully bootstrapped a standard system

Story: 2005543
Task: 34751
Change-Id: I070ad763c6106e9c1da9c84be88ebf8456de66bc
Author: Erich Cordoba <erich.cordoba.malibran@intel.com>
Signed-off-by: Tee Ngo <Tee.Ngo@windriver.com>
2019-07-02 17:23:13 -04:00

28 lines
808 B
YAML

---
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# SUB-TASKS DESCRIPTION:
# Validate the format of docker registry/no-proxy address
#
- name: Check if the supplied address is a valid domain name or ip address
vars:
script_content: |
# Make use of sysinv Address Validator
from sysinv.common.utils import is_valid_domain_or_ip
if not is_valid_domain_or_ip( "{{ input_address }}" ):
raise Exception("Invalid address format!")
shell: "{{ script_content }}"
args:
executable: /usr/bin/python
failed_when: false
register: domain_name_ip_check
- name: Fail if the supplied address is not a valid domain name or ip address
fail:
msg: "{{ input_address }} is an invalid address."
when: domain_name_ip_check.rc != 0