Dev to main #1
@@ -12,7 +12,7 @@
|
||||
|
||||
vars_prompt:
|
||||
- name: lxc_hostname
|
||||
prompt: "Hostname for the container"
|
||||
prompt: "Hostname for the container (may only contain letters (a-z, A-Z), numbers (0-9), and hyphens)"
|
||||
private: false
|
||||
|
||||
- name: lxc_root_password
|
||||
@@ -25,6 +25,14 @@
|
||||
prompt: "IP address for the container (in x.x.x.x/x formant)"
|
||||
private: false
|
||||
|
||||
pre_tasks:
|
||||
- name: Validate hostname
|
||||
ansible.builtin.fail:
|
||||
msg: |
|
||||
Invalid hostname: "{{ lxc_hostname }}"
|
||||
Hostname may only contain letters (a-z, A-Z), numbers (0-9), and hyphens (-).
|
||||
when: not lxc_hostname is regex('^[a-zA-Z0-9-]+$')
|
||||
run_once: true
|
||||
|
||||
roles:
|
||||
- ../roles/deploy_lxc_on_proxmox
|
||||
|
||||
Reference in New Issue
Block a user