0down votefavorite <https://stackoverflow.com/questions/48280121/invalid-credentails-error-in-ansible-win-share-when-we-create-the-file-share-p#> I create AWS app server using ansible script and install the software using temp username and password in winrm host file.After setup I run the script userdataapp.ps1 to join the machine to XE domain. After that I create Fileshare and adding XE email account and service account in the Fileshare Permission section. When it executes the win_share script it says invalid credentials error. The reason is after joining to XE domain it does not take the temp user name and password. We can use only our Windows Login account [email protected] ansible_ssh_pass=<pwd> Is there any way to change the temp login to Windows login dynamically while excuting the Win_share script? Note: Before join to XE domain if I run the win_share script , it says invalid domain as xe.com Temporary Host login ansible_connection=winrm ansible_port=5986 ansible_ssh_port=5986 ansible_ssh_user=administrator ansible_ssh_pass=myTempPassword123! ansible_winrm_server_cert_validation=ignore ansible_winrm_operation_timeout_sec=120 ansible_winrm_read_timeout_sec=150 //Joining to XE domain - name: Install the userdate ps1 raw: "Powershell.exe -File C:\\xxxecode\\userdataapp.ps1" //Creating the share - name: Add secret share win_share: name: AGITAR_DEVELOPER description: top secret share path: C:\shares\AGITAR_DEVELOPER list: yes full: [email protected],[email protected] read: [email protected] <https://lh3.googleusercontent.com/-UoSRwS44ZxQ/Wl7MumgUf1I/AAAAAAAAAZo/zcMLw60p5hIXYvPmlq-fErKK0XjuJMKXwCLcBGAs/s1600/Ansible_Winshare.png> -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2b855901-ee63-4542-91ce-e12b924890d8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
