var for --ask-pass ?

81 views
Skip to first unread message

sergey....@gmail.com

unread,
Apr 4, 2019, 2:18:57 AM4/4/19
to Ansible Project
I start playbook : ansible-playbook win_install_ascon.yml --ask-pass

define in playbook:
...
ansible_become_pass: "{{ remote_pass }}"
...

OUT:
...
 FAILED! => {"msg": "The field 'become_pass' has an invalid value, which includes an undefined variable. The error was: 'remote_pass' is undefined"}
...

What variable is the password in?

I do not want to enter the password twice when: ansible-playbook win_install_ascon.yml --ask-pass --ask-become-pass
I do not want to use ansible-vault

Thank.

Raghavendra Rao

unread,
Apr 4, 2019, 2:36:58 AM4/4/19
to ansible...@googlegroups.com
This has nothing to do with ansible vault unless you have vault protected files included in your playbook.

--ask-pass is used for providing a connection password. i.e a way in which the ansible control node talks to the remote systems
--ask-become-pass is used for providing a pasword for the become_method. for e.g a password for sudo or su....

If you don't have passwordless sudo or su set + do not have SSH keys setup, you have to use both of them in a command.


-R.Rao

Thank.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/10cfdd08-a0ed-4627-82b3-998005f23d46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sergey....@gmail.com

unread,
Apr 4, 2019, 2:47:20 AM4/4/19
to Ansible Project
its for windows.

Those are not possible to take one variable from the command line and I will have to type the same password twice?

четверг, 4 апреля 2019 г., 10:36:58 UTC+4 пользователь Raghavendra Rao написал:
On Thu, 4 Apr 2019 at 11:49, <sergey....@gmail.com> wrote:
I start playbook : ansible-playbook win_install_ascon.yml --ask-pass

define in playbook:
...
ansible_become_pass: "{{ remote_pass }}"
...

OUT:
...
 FAILED! => {"msg": "The field 'become_pass' has an invalid value, which includes an undefined variable. The error was: 'remote_pass' is undefined"}
...

What variable is the password in?

I do not want to enter the password twice when: ansible-playbook win_install_ascon.yml --ask-pass --ask-become-pass
I do not want to use ansible-vault

This has nothing to do with ansible vault unless you have vault protected files included in your playbook.

--ask-pass is used for providing a connection password. i.e a way in which the ansible control node talks to the remote systems
--ask-become-pass is used for providing a pasword for the become_method. for e.g a password for sudo or su....

If you don't have passwordless sudo or su set + do not have SSH keys setup, you have to use both of them in a command.


-R.Rao

Thank.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.

James Cassell

unread,
Apr 4, 2019, 9:21:16 AM4/4/19
to Ansible List

On Thu, Apr 4, 2019, at 2:18 AM, sergey....@gmail.com wrote:
> I start playbook : ansible-playbook win_install_ascon.yml --ask-pass
>
> define in playbook:
> ...
> ansible_become_pass: "{{ remote_pass }}"

ansible_become_password: "{{ ansible_password }}"


V/r,
James Cassell

Brian Coca

unread,
Apr 4, 2019, 3:40:38 PM4/4/19
to Ansible Project
if you do --ask-pass and --ask-become-password, you only need to enter
it once, the 2nd defaults to the first.

--
----------
Brian Coca

sergey....@gmail.com

unread,
Apr 5, 2019, 4:42:24 AM4/5/19
to Ansible Project
sorry:
FAILED! => {"msg": "The field 'become_pass' has an invalid value, which includes an undefined variable. The error was: 'ansible_password' is undefined"}

четверг, 4 апреля 2019 г., 17:21:16 UTC+4 пользователь James Cassell написал:

sergey....@gmail.com

unread,
Apr 5, 2019, 4:57:15 AM4/5/19
to Ansible Project
sorry.

ansible-playbook win_install_ascon.yml --ask-pass --ask-become-password
Usage: ansible-playbook [options] playbook.yml [playbook2 ...]

ansible-playbook: error: no such option: --ask-become-password

четверг, 4 апреля 2019 г., 23:40:38 UTC+4 пользователь Brian Coca написал:

sergey....@gmail.com

unread,
Apr 5, 2019, 5:15:28 AM4/5/19
to Ansible Project
sorry! !!!

I made error :(

I run : ansible-playbook win_install_ascon.yml --ask-pass --ask-become-pass
pass enter
enter

ALL WORKS.
THANK YOU VERY MUCH

четверг, 4 апреля 2019 г., 23:40:38 UTC+4 пользователь Brian Coca написал:
if you do --ask-pass and --ask-become-password, you only need to enter

Raghavendra Rao

unread,
Apr 5, 2019, 8:16:24 AM4/5/19
to ansible...@googlegroups.com
Ok

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages