I am trying to install/deploy vcert as a test to a test windows server.
Here is the task in my role: --- - name: Check current user identity ansible.windows.win_whoami: register: current_user
- name: Display current user ansible.builtin.debug: msg: "Connected as {{ current_user.account.account_name }}"
- name: Create an application shortcut for an executable in PATH to your desktop community.windows.win_shortcut: src: 'C:\venafi\vcert_v5.9.0_windows.exe' dest: 'C:\venafi\vcert.exe'
It keeps failing with the following error: task path: /runner/project/playbook.yml:2 fatal: [test01.example.com]: FAILED! => { "msg": "No setting was provided for required configuration plugin_type: become plugin: runas setting: become_user " }
I donât understand why. I have tried adding the become statements in there for ansible, but those fail as well.
Why did you create a new credential type for this? If youâre using AAP or AWX, the âMachineâ credential type is available for this use case.
Are you using Become in Play Level? If so, you have to set a become user; look at the run_as documentation for more information. Setting become_user is required.
If you are using AAP/AWX, you will need to setup Kerberos within your container image so you can auth to the domain and configure the krb5.conf to point to your PDC
Your domain name generally needs to be in all caps if you are using Kerberos auth (i.e. admin@example.com will not work, needs to be admin@EXAMPLE.COM)
You will most likely need some additional extra vars (we apply at the inventory level) to indicate that you want to use WinRM instead of SSH for the connection and that the connection is Kerberos/Basic/NTLM/CredSSP
ansible_connection: winrm
ansible_winrm_transport: basic|certificate|kerberos|ntlm|credssp
ansible_winrm_server_cert_validation: ignore <<< Only use this if you have untrusted/self-signed certs for WinRM
Hi all,
Thanks for the quick response on this. I have moved over to a Machine credential and that works. However I am getting the following error:
task path: /runner/project/playbook.yml:2
fatal: [windows01.example.com]: FAILED! => {"msg": "No setting was provided for required configuration plugin_type: become plugin: runas setting: become_user "}
Do I need to set this in playbook? Can it not be set a as variable in the task it is about to run?