Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-26 Thread Stefan Hornburg (Racke)
On 5/26/20 3:09 PM, Tony Wong wrote: > any idea why this is failing? Syntax is right as far as I can tell > That tells me that your prowess in reading error messages is somewhat limited :-). As per documentation: use dest parameter instead of destination. Regards Racke > > TASK

Re: [ansible-project] ansible kerberos library is not installed

2020-05-26 Thread Werner Flamme
Tony Wong schrieb am 25.05.20 um 17:39: > maybe I am missing krb? > > > tony@ubuntu:~/windows$ sudo apt install -y krb5-user libpam-krb5 > libpam-ccreds auth-client-config > Reading package lists... Done > Building dependency tree > Reading state information... Done > Some packages could not be

Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
any idea what this error is? TASK [Install Vmware tools Silent] task path: /home/tony/windows/download.yml:15 Using module file

Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
any idea why this is failing? Syntax is right as far as I can tell TASK [Create Directory if not exist] ok: [rw-ctxweb-02.wsgr.com] ok: [pa-mgt01.wsgr.com] TASK [Download exe to winbox]

Re: [ansible-project] ansible kerberos library is not installed

2020-05-26 Thread Tony Wong
this is error i keep getting tony@ubuntu:~$ pip install pykerberos DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2

Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
Thank you. On Tue, May 26, 2020 at 6:26 AM Stefan Hornburg (Racke) wrote: > On 5/26/20 3:09 PM, Tony Wong wrote: > > any idea why this is failing? Syntax is right as far as I can tell > > > > That tells me that your prowess in reading error messages is somewhat > limited :-). > > As per

[ansible-project] Read the values from file and store in variable.

2020-05-26 Thread Akshay Bora
Hi All, I have a file named as /etc/oraInst.loc. The file contents are as below. inventory_loc=/u01/app/oraInventory inst_group=oinstall *I need to store the value of inventory_loc , that is ,/u01/app/oraInventory in any variable.* These files are at remote host and not on ansible controller

Re: [ansible-project] Parsing results

2020-05-26 Thread Dick Visser
Have you considered using the ec2 dynamic inventory? With that all hosts will have the majority of ec2 related info populated as facts, so you can just reference them as "{{ ec2_id }}". https://docs.ansible.com/ansible/latest/plugins/inventory/aws_ec2.html On Tue, 26 May 2020 at 02:20, Andrew

Re: [ansible-project] Using variable to compare stdout parameter

2020-05-26 Thread Sivakumar Saravanamuthu
OK here it is. I have build a server X expecting all the parameter are in place. During validation and qualification phase the user who didn't build that server has to cross check parameter using simple playbook to make sure server has right chrony server IP address and other basic setting are

Re: [ansible-project] Using variable to compare stdout parameter

2020-05-26 Thread Dick Visser
I don't understand what you are trying to achieve? You are trying to find out a server's region based on its configured ntp servers? But you already have inventory groups for each location. Can you describe your REAL goal, and include that mysterious build verification task as well. And the

Re: [ansible-project] Using variable to compare stdout parameter

2020-05-26 Thread Stefan Hornburg (Racke)
On 5/26/20 9:15 AM, Sivakumar Saravanamuthu wrote: > OK here it is.  > > I have build a server X expecting all the parameter are in place.  > > During validation and qualification phase the user who didn't build that > server has to cross check parameter using > simple playbook to make sure

Re: [ansible-project] Read the values from file and store in variable.

2020-05-26 Thread Sivakumar Saravanamuthu
Hi Why can't you grep the required output using shell and store in >> remote server. Thank you. Regards, Siva On Tue, 26 May 2020 at 16:14, Akshay Bora wrote: > Hi All, > > I have a file named as /etc/oraInst.loc. The file contents are as below. > > inventory_loc=/u01/app/oraInventory >

Re: [ansible-project] facing the problem in mapping network drive

2020-05-26 Thread mahesh g o
Hi Jordan, I tried the below playbook to store the credential that Windows will use for mapped drives. But it is throwing the below error : - hosts: [win] gather_facts: false tasks: - name: Save the network credentials required for the mapped drive win_credential: name:

[ansible-project] Re: facing the problem in mapping network drive

2020-05-26 Thread David Foley
Hi, It may be easier to use PowerShell within an Ansible caller. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-psdrive?view=powershell-7 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] Using variable to compare stdout parameter

2020-05-26 Thread Sivakumar Saravanamuthu
Sometimes you are not in position to ask question :-) that is my position now. Boss want this validation playbook and I not getting clue regarding how to verify chrony parameters of three different location in single playbook. I used Jinja2 template to deploy those ntp server configuration one

[ansible-project] Re: how to divide bulk dynamic chunk data in to small chunks and pass from ansible to API

2020-05-26 Thread Diyawary
This can be done like below- Batch : "{{ EPG_all|batch(100)|list }}" On Friday, 22 May 2020 04:18:55 UTC-5, Diyawary wrote: > > Hi Team > Please help me how to divide bulk chunk data in to small chunks so small > chunks update to the snow api. > > below is my playbook and my data is in EPG_all

Re: [ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
ok I got it working now with win_command but still having some errors TASK [Install Vmware tools Silent] ** task path: /home/tony/windows/download2.yml:15 Using module file

Re: [ansible-project] Re: Parsing results

2020-05-26 Thread Vladimir Botka
On Tue, 26 May 2020 16:47:22 -0700 (PDT) ChrisV wrote: > `network_interfaces` is a list. You will need to include the index of the > interface, which is 0 in your example. > > Ex. "{{ ec2_facts.instances.network_interfaces[0] }}" The loop below would work in this case. > > - name: setting

Re: [ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
now no errors but its not getting installed as it would manually, PLAY [testing win_get_url] ** TASK [Gathering Facts]

[ansible-project] Re: Parsing results

2020-05-26 Thread Andrew Morgan
thank you this is a good suggestion, however is beyond the scope of my project at the moment. So unluckily I will have to try and parse the variables.Anyone can assist? On Monday, 25 May 2020 20:20:35 UTC-4, Andrew Morgan wrote: > > Hello All, > > I have a script below that will get the

Re: [ansible-project] Parsing results

2020-05-26 Thread Vladimir Botka
On Mon, 25 May 2020 17:20:35 -0700 (PDT) Andrew Morgan wrote: > - name: setting fact for subnet ID >set_fact: SUBNETID="{{ item.subnet_id }}" >with_items: "{{ ec2_facts.instances.network_interfaces }}" This one looks promising. To move forward simple debug must work first - debug:

[ansible-project] Re: Parsing results

2020-05-26 Thread ChrisV
`network_interfaces` is a list. You will need to include the index of the interface, which is 0 in your example. Ex. "{{ ec2_facts.instances.network_interfaces[0] }}" ChrisV On Monday, May 25, 2020 at 5:20:35 PM UTC-7, Andrew Morgan wrote: > > Hello All, > > I have a script below that will

Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
any idea? I added state: present and still getting same error fatal: [pa-mgt01.wsgr.com]: FAILED! => { "changed": false, "msg": "unexpected rc from install c:\\temp\\VMware-tools-11.0.5-15389592-x86_64.exe: see rc, stdout and stderr for more details", "rc": 1639,

Re: [ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
but I got all the steps working except win_package, There seems to be something wrong with execution. I manually ran the setup.exe and works On Tue, May 26, 2020 at 12:18 PM David Foley wrote: > instead of the win_get_url use the win_package that will install the > application for you

[ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread David Foley
instead of the win_get_url use the win_package that will install the application for you vm_tools win_package: path: https://repo.saltstack.com/windows/Salt-Minion-3000-Py3-AMD64-Setup.exe product_id: 'Salt-Minion-3000-Py3-AMD64-Setup.exe' arguments:

Re: [ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread Jean-Yves LENHOF
Hi, Just a guess (I'm not a windows man)...Perhaps you need to do silent install because you are not "desktop logged" when you use ansible. Have a look here for some example (you need to look for the good ones for your version, but you've got the idea)

Re: [ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread Tony Wong
I already tried the arguments. I know /s /v /qn works manually. why does that work on ansible? --- - name: testing win_get_url hosts: all tasks: - name: Create Directory if not exist win_file: path: c:\temp state: directory - name: Download exe to winbox

[ansible-project] Re: junit callback Options example

2020-05-26 Thread Oliver
Hello, have the same problem. In the documentation it says that you should use environment variables to configure the output directory of the plugin. In this case I don't see the point while using the junit callback from ansible which is not within a playbook. So the environment variables set

[ansible-project] Need help on using a variable in when condition

2020-05-26 Thread Pandu jh
I have a below task in my playbook. It checks the desired count of the process specified in vars. If a task returned 50 value and since it has 0. my condition gets satisfied which is incorrect. vars: - sap_process_count: "0" tasks: - name: Pre Check - Verifying app status

Re: [ansible-project] Need help on using a variable in when condition

2020-05-26 Thread Dick Visser
That looks fragile. Instead of chaining a load of shell commands and hoping for the best, why don't you use the available system utilities that are actually designed to manage starting and stopping applications? See https://docs.ansible.com/ansible/latest/modules/systemd_module.html On Tue, 26

[ansible-project] Append to var in group or host var when defined in role default var

2020-05-26 Thread Laurent HENSSEN
Hi, I'm trying something which is currently failing. I have a role using a list defined in its default vars. My objective is to use the same var but to be able to "add" more item into the list at group / host var definition. So, var in role/xxx/defaults/main.yml is a list and in group_vars/