Skip to content

Commit

Permalink
new: check user input now displays missing variable name"
Browse files Browse the repository at this point in the history
fix: the variable was defined always because an ENTER will define it
Therefore a check was added to also detect empty ENTER presses
  • Loading branch information
secure diversITy committed Mar 16, 2016
1 parent 69d4951 commit a96cd14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions add_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

tasks:
- name: Check user input
fail: msg="A required value is empty. Please restart playbook and ensure all mandatory fields are defined."
when: app2group is not defined or app_name is not defined
fail: msg="A required value is empty ==> '{{ item }}' <===. Please restart and ensure you set all mandatory fields!"
with_items: [ app_name, app2group ]
when: "{{ item }} is not defined
or ({{item}} is defined and {{ item }} == '')"

- name: Convert to ansible friendly name
set_fact:
Expand Down

0 comments on commit a96cd14

Please sign in to comment.