diff --git a/playbooks/group_vars/00_empty_survey.json b/playbooks/group_vars/00_empty_survey.json new file mode 100644 index 0000000..c234575 --- /dev/null +++ b/playbooks/group_vars/00_empty_survey.json @@ -0,0 +1,9 @@ +{ + "name": "empty survey", + "description": "don't use this survey", + "spec": [ + { + "type": "text", + } + ] +} diff --git a/playbooks/group_vars/all.yml b/playbooks/group_vars/all.yml index 2cef085..8400e44 100644 --- a/playbooks/group_vars/all.yml +++ b/playbooks/group_vars/all.yml @@ -7,8 +7,8 @@ demos: playbook: "playbooks/01_deploy_application.yml" credential: "Demo Credential" survey_enabled: no - survey_spec: "none=none" - # survey_spec: "{{ lookup('file', 'my_survey.json') }}" + survey_spec: "none" workshop_type: - f5 - rhel +empty_survey: "{{ lookup('file', '../../../playbooks/surveys/00_empty_survey.json') }}" diff --git a/playbooks/surveys/00_empty_survey.json b/playbooks/surveys/00_empty_survey.json new file mode 100644 index 0000000..c234575 --- /dev/null +++ b/playbooks/surveys/00_empty_survey.json @@ -0,0 +1,9 @@ +{ + "name": "empty survey", + "description": "don't use this survey", + "spec": [ + { + "type": "text", + } + ] +} diff --git a/playbooks/surveys/01_deploy_application.json b/playbooks/surveys/01_deploy_application.json new file mode 100644 index 0000000..2982e85 --- /dev/null +++ b/playbooks/surveys/01_deploy_application.json @@ -0,0 +1,30 @@ +{ + "name": "L3 Survey", + "description": "Prompt for interface name, ipv4 and ipv6", + "spec": [ + { + "type": "text", + "question_name": "Which interface?", + "question_description": "Please specify the interface name", + "variable": "interface_name", + "required": true, + "default": "lo0" + }, + { + "type": "text", + "question_name": "Please set an IPv4 Address", + "question_description": "e.g. 192.168.1.1/24, it is OK to leave this blank if you are using IPv6 only", + "variable": "interface_ipv4", + "required": false, + "default": "192.168.1.1/24" + }, + { + "type": "text", + "question_name": "Please Set an IPv6 Address", + "question_description": "e.g. fc00::2/64, it is OK to leave this blank if you are using IPv4 only", + "variable": "interface_ipv6", + "required": false, + "default": "fc00::2/64" + } + ] +} diff --git a/roles/install_demo/tasks/main.yml b/roles/install_demo/tasks/main.yml index 2b3abf4..f6b1ad6 100644 --- a/roles/install_demo/tasks/main.yml +++ b/roles/install_demo/tasks/main.yml @@ -20,7 +20,7 @@ playbook: "{{demos[demo].playbook}}" credential: "{{demos[demo].credential}}" survey_enabled: "{{demos[demo].survey_enabled}}" - survey_spec: "{{demos[demo].survey_spec}}" + survey_spec: "{% if demos[demo].survey_enabled == none %}{{empty_survey}}{% endif %}" tower_username: "{{my_tower_username}}" tower_password: "{{my_tower_password}}" tower_host: "{{my_tower_host}}"