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

How do I can hide password in inventory #165

Closed
haind13 opened this issue Apr 5, 2017 · 2 comments
Closed

How do I can hide password in inventory #165

haind13 opened this issue Apr 5, 2017 · 2 comments

Comments

@haind13
Copy link

haind13 commented Apr 5, 2017

I use ntc-ansible but I can not how do I can hide my password in inventory file?
Because I have any other people to administrator network devices.
Ansible vault just creat .yml

@itdependsnetworks
Copy link
Contributor

@haind13 This is out of scope to the intention of this repo. But essentially as you stated, Ansible Vault is probably the best solution. That being said you can use vars_prompt or in 2.3 make use of the -u and -k flags, as shown here: https://github.com/gundalow/ansible/blob/network-debug-docs/docs/docsite/rst/network_how_tos.rst

That all being said, I would urge you to check in with ansible IRC at #ansible on irc.freenode.net or can join the ansible channel on our community slack at: slack.networktocode.com and ask questions there. They should be able to help with ansible vault issues or give a different perspective.

@haind13
Copy link
Author

haind13 commented Apr 7, 2017

But ntc-ansible required username and password in inventory.
If I do not have this vars, it will not execute and say error:

[root@monitornet61 ansible]# ansible-playbook ntc_show_command.yml -u admin -k

TASK [Show Config] *************************************************************
fatal: [rcnGiangVo]: FAILED! => {"changed": false, "failed": true, "msg": "username is required"}

I want to use with flag -u and -k but it can not!

@haind13 haind13 closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants