Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hostname field should validate input #205

Open
renatomefi opened this issue May 7, 2015 · 2 comments
Open

Hostname field should validate input #205

renatomefi opened this issue May 7, 2015 · 2 comments

Comments

@renatomefi
Copy link
Contributor

I was trying some variations at phansible web interface and when I put "phansible_issue_182" as my hostname the ansible was not able to set this hostname for the guest (of course), I can see two possible solutions:
1- Validate the field;
2- Prepare the hostname before generating the file, removing unwanted chars.

Here is the error for those looking at ansible errors at google:

TASK: [vagrant_local | Set the hostname] ************************************** 
failed: [192.168.33.101] => {"changed": true, "cmd": "hostname phansible_issue_185_2", "delta": "0:00:00.002881", "end": "2015-05-07 19:50:04.758369", "rc": 1, "start": "2015-05-07 19:50:04.755488", "warnings": []}
stderr: hostname: the specified hostname is invalid
@InFog
Copy link
Contributor

InFog commented May 26, 2015

I think just removing unwanted chars is good enough. Do you want to prepare something like this, @renatomefidf? If so, please, do it. Otherwise I'll :)

@debo
Copy link
Member

debo commented Feb 16, 2016

@renatomefidf I do prefer option one, I'll work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants