var for --ask-pass ?

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.

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.

Refer: https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html

-R.Rao

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?

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

if you do --ask-pass and --ask-become-password, you only need to enter
it once, the 2nd defaults to the first.

sorry:

FAILED! => {“msg”: “The field ‘become_pass’ has an invalid value, which includes an undefined variable. The error was: ‘ansible_password’ is undefined”}

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

sorry! !!!

I made error :frowning:

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

ALL WORKS.
THANK YOU VERY MUCH

Ok