Add regexp to drop spaces from hostnames in prompts.
Signed-off-by: James Antill <james@and.org>
This commit is contained in:
parent
6d9ff9b5f2
commit
aa5691d1b5
2 changed files with 6 additions and 4 deletions
|
@ -19,9 +19,10 @@
|
|||
- name: find instances
|
||||
vars_prompt:
|
||||
- name: target
|
||||
prompt: What is the target vhost
|
||||
prompt: What is the target vhost (to reboot)
|
||||
private: false
|
||||
hosts: "{{ target }}"
|
||||
# Use a simple regexp to ignore spaces people might accidentally paste.
|
||||
hosts: "{{ target | regex_search('[-a-z0-9.]+')}}"
|
||||
gather_facts: false
|
||||
user: root
|
||||
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
- name: Find instances
|
||||
vars_prompt:
|
||||
- name: target
|
||||
prompt: What is the target vhost
|
||||
prompt: What is the target vhost (to upgrade)
|
||||
private: false
|
||||
hosts: "{{ target }}"
|
||||
# Use a simple regexp to ignore spaces people might accidentally paste.
|
||||
hosts: "{{ target | regex_search('[-a-z0-9.]+')}}"
|
||||
gather_facts: false
|
||||
user: root
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue