[ansible-project] Re: Ansible windows modules
Jon, I have tried with win_package, as .NET framework 4.5 can not be uninstalled so I just grab a fake product_id (not sure for the other but for me, I'm using ansible 1.9.3 and product_id param should be *productid* without dash) and the results are the same as using raw command. If I use the offline package then receive error 16389 and use the web package then the installation runs in middle then stop with error 5. Still no luck so far. I will try to upgrade to 2.0 then use win_acl to overcome the error 5 or win_webpicmd. Stavros, I can run the installation without ansible for offline package (copy this package into the remote machine): - Use powershell to call on the remote machine - Use paexec and call the exe from remote Thank you for your update. -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5606d671-e769-4534-b48f-20b947a89b9e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible windows modules
Hi Stavros, I think you're right on x64-Windows8.1-KB2934520-x64.msu. I tried to dumb the installation log and found access denied when running the web installation package. I think there is something wrong on my environment setting that cause about security issue, try with another environment, it works like a charm :( Hi Jon, I have tried with Administrator account but no luck For my account in administrators group, I have to disable the UAC in order to run it (even manual run the installation package) Will keep you post on my finding Quang -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dc075265-5a25-4724-9516-e33cf98ed188%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible windows modules
Actually, when I update with all the latest updates from Windows, I can go through the problem, means, with the latest Windows update, you're good with msu installation. Thank you all! -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/35814d06-7d57-4b1d-8d99-9207e356d553%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible windows modules
The problem with installing msu file via WinRM (as Ansible uses Py connects to window host via WinRM). I grab this article on the net (http://www.hurryupandwait.io/blog/safely-running-windows-automation-operations-that-typically-fail-over-winrm-or-powershell-remoting) and this one from MS (https://support.microsoft.com/en-us/kb/2773898) but seems there is an update has fixed it. Trying to run Window update for my environment to see how it goes. -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0d570849-3d82-423e-801d-ae9bc50cbecf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Ansible windows modules
Hi all, I start learning Ansible to run some deployment tasks on Windows platform. I encounter some hiccups with Windows modules as below: - Install the executable package (.NET 4.5.2 framework) - I download the offline installer (https://www.microsoft.com/en-us/download/details.aspx?id=42642) then run the installation with a raw command from my playbook then it return an error ("rc": 16389) failed: [x.x.x.x] => {"rc": 16389} stdout: An error was encountered. Unspecified error - I did some searching then this error might relate to the cache size then I use the Web installation (https://www.microsoft.com/en-us/download/details.aspx?id=42643) then Ansible can run the package and download the package in middle then throw an error ("rc" 5) (something relates to access denied). I try to use with administrator account for the host inventory but no luck with that move - Install an MSI with properties - I try to use win_msi module and see the win_msi.ps1 script that execute the installation by "msiexec.exe /i $params.path /qb /l $logfile $extra_args;" so I try to input the properties within the path parameter, for ex: C:\tool.msi property1=A perty2=b. However, seems my syntax is not correct with the parse function then I got this error This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package. - Then I try to run the raw command in playbook: raw: msiexec.exe /i C:\Tool.msi property1=a property2=b /qn . This way can install this msi, in conclusion, we can't not the win_msi module at the moment for installation with properties? Thank you very much for your help Quang -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ba9d19fb-27e4-47b0-809a-28a8cecb71b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible 2.0 window modules
For win_service: put the value in "" then it works :D -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bbddd4fc-2d13-41db-a4cb-e1e1b45a3df9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Ansible 2.0 window modules
Hi all, I'm using Ansible 2.0 but I have problem with: - win_file: can't create new directory sample playbook - name: create Source directory win_file: path=C:\MySource state=directory - win_service: can't manage windows service (no affect). The input name is the service name (service name is the same with service display name) sample playbook: - name: update service My_Service stopped win_service: name: My_Service state: stopped Do you have any idea? Thanks, Quang -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a278b222-910e-4ca9-9384-05500a958629%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible 2.0 window modules
Please disregard about the win_file. I can make it run. My typo error! On Thursday, March 31, 2016 at 6:59:46 PM UTC-7, Quang Truong wrote: > > Hi all, > > I'm using Ansible 2.0 but I have problem with: > - win_file: can't create new directory > > sample playbook > > - name: create Source directory > win_file: path=C:\MySource state=directory > > > - win_service: can't manage windows service (no affect). The input name is > the service name (service name is the same with service display name) > > > sample playbook: > > - name: update service My_Service stopped > win_service: > name: My_Service > state: stopped > > > Do you have any idea? > > > Thanks, > > Quang > > -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/94a01aa9-cdc6-47c5-9e99-480afd0fb82f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible winrm problem
Have you try to run the EnableAnsible.ps1 before? I encountered this error usually because the preparation for WinRM wasn't run successfully Quang -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/aadae2eb-d51f-40f9-a536-fe7f7453a5be%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible user privilege
Another update, I use 'su root' and can access to: /home/[userX]/.ansible but got permission denied when open tmp or cp directories. On Friday, April 6, 2018 at 12:48:33 PM UTC-7, Quang Truong wrote: > > Dear all, > > I'm new to ansible and system admin on linux, I have a problem that I > don't understand what happen behind the scene. > > Here is my scenario: > > - I create a kvm (machine B) on my host machine, this is also an ansible > control machine (machine A) > - Then copy the ssh key of the user (user X with sudoer) I will run > ansible playbook from A to B > - I can run playbook with become privilege, in my playbook I install NIS > and setup B to join my network domain (bind with a dns server) > - Then now the problem happen, I can't run playbook from A to B anymore > with userX > > Below are the problems: > + When I put become: true (use default become_user, should be root) for > all tasks then playbook can't gather facts from B, I got Permission denied > when gathering facts > /usr/bin/python: can't open file > '/home/[*userX*]/.ansible/tmp/ansible-tmp-1523038454.61-125714211155466/setup.py': > > [Errno 13] Permission denied > + When I move become: true to individual task, then I have same > Permission denied > /usr/bin/python: can't open file > '/home/[*userX*]/.ansible/tmp/ansible-tmp-1523040035.49-151403862005878/apt.py': > > [Errno 13] Permission denied > + When I try to elevate to exact user X with become_user: userX, seems > this user doesn't have proper permission > "changed": false, "msg": "Failed to lock apt for exclusive operation" > > Seems I have some problems: > - root user didn't setup properly on B so it can't access to /home/[ > *userX*] directory (I read some instruction said that use 'HOME=/root > ansible-playbook my_pb.yml ...' but still failed: OSError: [Errno 13] > Permission denied: '~/.ansible/tmp') > - not sure what happen with userX but it can't execute sudo via ansible on > B (although I tried to ssh with userX on B and do some sudo tasks such as > apt-get install) > > Please help to tell if I have miss any configurations (I think during the > kvm creation, I miss some steps here) > > Thanks, > Quang > > > -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fd12c52a-26c7-4dc5-b4f2-3d3834fb1653%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Ansible user privilege
Dear all, I'm new to ansible and system admin on linux, I have a problem that I don't understand what happen behind the scene. Here is my scenario: - I create a kvm (machine B) on my host machine, this is also an ansible control machine (machine A) - Then copy the ssh key of the user (user X with sudoer) I will run ansible playbook from A to B - I can run playbook with become privilege, in my playbook I install NIS and setup B to join my network domain (bind with a dns server) - Then now the problem happen, I can't run playbook from A to B anymore with userX Below are the problems: + When I put become: true (use default become_user, should be root) for all tasks then playbook can't gather facts from B, I got Permission denied when gathering facts /usr/bin/python: can't open file '/home/[*userX*]/.ansible/tmp/ansible-tmp-1523038454.61-125714211155466/setup.py': [Errno 13] Permission denied + When I move become: true to individual task, then I have same Permission denied /usr/bin/python: can't open file '/home/[*userX*]/.ansible/tmp/ansible-tmp-1523040035.49-151403862005878/apt.py': [Errno 13] Permission denied + When I try to elevate to exact user X with become_user: userX, seems this user doesn't have proper permission "changed": false, "msg": "Failed to lock apt for exclusive operation" Seems I have some problems: - root user didn't setup properly on B so it can't access to /home/[*userX*] directory (I read some instruction said that use 'HOME=/root ansible-playbook my_pb.yml ...' but still failed: OSError: [Errno 13] Permission denied: '~/.ansible/tmp') - not sure what happen with userX but it can't execute sudo via ansible on B (although I tried to ssh with userX on B and do some sudo tasks such as apt-get install) Please help to tell if I have miss any configurations (I think during the kvm creation, I miss some steps here) Thanks, Quang -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f9f6a41e-0fb0-483a-9a6c-46b1ba3dd426%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible user privilege
I tried with this guide https://stackoverflow.com/questions/37880491/ansible-tmp-ansible-tmp-permission-denied It works for my case but I don't understand what happen behind the scene -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/42b3913e-0193-42dd-901a-9465d1d1f674%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.