[ansible-project] Ansible to execute sql script on azure sql(paas)-- sql-cmd

2020-05-19 Thread vinod devops
Hi guys, I am working on ansible task to execute sql script on azure sql . for Iaas I am using sql-cmd to execute sql script remoely. My question how do I execute sql script on azure sql from ansible. Thanks, vinod -- You received this message because you are subscribed to the Google

Re: [ansible-project] Re: copy restricted files from server A to B

2020-05-19 Thread Jean-Yves LENHOF
Use copy (to copy on the second server), fetch (to get the file on the controller), and stat (to get rights) modules Regards, JYL Le 19/05/2020 à 22:38, Laci a écrit : Another detail is that serverA can't talk to serverB or vice versa, only the Ansible server can talk to both of them On

Re: [ansible-project] Re: copy restricted files from server A to B

2020-05-19 Thread Dick Visser
Have a look at the various examples on the synchronize module page: https://docs.ansible.com/ansible/latest/modules/synchronize_module.html. You can use a combination of delegate_to and push/pull mode. On Tue, 19 May 2020 at 22:38, Laci wrote: > > Another detail is that serverA can't talk to

Re: [ansible-project] how to execute a handler if a file is found

2020-05-19 Thread Dick Visser
On Tue, 19 May 2020 at 21:29, Dan Idar wrote: > > Hello > I would like to be able to find the files that are bigger than a certain dize > and then restart a service if this happens because it mean the rotation is > not working after the configurtion update Ansible would also be a great tool to

[ansible-project] Re: copy restricted files from server A to B

2020-05-19 Thread Laci
Another detail is that serverA can't talk to serverB or vice versa, only the Ansible server can talk to both of them On Tuesday, May 19, 2020 at 2:29:49 PM UTC-4, Laci wrote: > > I have some files with 0400/-r permissions on server A that I need > to copy to server B and preserve

Re: [ansible-project] how to execute a handler if a file is found

2020-05-19 Thread Matt Martz
Maybe something like this: - name: find files find: path: /var/log patterns: '*.log' size: 100m register: bigfiles changed_when: bigfiles.files != [] notify: start service On Tue, May 19, 2020 at 2:29 PM Dan Idar wrote: > Hello > I

[ansible-project] how to execute a handler if a file is found

2020-05-19 Thread Dan Idar
Hello I would like to be able to find the files that are bigger than a certain dize and then restart a service if this happens because it mean the rotation is not working after the configurtion update the find module does not 'change' when the file is found or not and i know i can trigger a

[ansible-project] copy restricted files from server A to B

2020-05-19 Thread Laci
I have some files with 0400/-r permissions on server A that I need to copy to server B and preserve permissions. For example: serverA:/etc/ssl_cert.key -> serverB:/etc/ssl_cert.key How would you do it? -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] how to run an if/else test in a task

2020-05-19 Thread Stefan Hornburg (Racke)
On 5/19/20 4:23 PM, Jerome Meyer wrote: > Hi Teams, > > I'm looking for to do a test before to execute a task. I need to checkup if > my computer has already joined the domain > before to join it. otherwise, the adcli will failed. > When computer isn't in domain, the klist will return a "not

[ansible-project] Re: how to run an if/else test in a task

2020-05-19 Thread IaV
In the when clause use something like ad_join_status.stdout_lines[0] to check what it needs to be add - debug var: ad_join_status and see what is there -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

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

2020-05-19 Thread Jean-Yves LENHOF
As written in my email : win_get_url module ⁣Télécharger BlueMail pour Android ​ Le 19 mai 2020 à 17:42, à 17:42, Tony Wong a écrit: >I am not sure. because curl is not available on windows boxes. > >On Tue, May 19, 2020 at 8:16 AM Jean-Yves LENHOF > >wrote: > >> Hi, >> >> Why not using curl

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

2020-05-19 Thread Tony Wong
I am not sure. because curl is not available on windows boxes. On Tue, May 19, 2020 at 8:16 AM Jean-Yves LENHOF wrote: > Hi, > > Why not using curl on this site or into an internal server synchronized on > this server : > > https://packages.vmware.com/tools/esx/index.html > > For example you

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

2020-05-19 Thread Jean-Yves LENHOF
Hi, Why not using curl on this site or into an internal server synchronized on this server : https://packages.vmware.com/tools/esx/index.html For example you have direct executable here : https://packages.vmware.com/tools/esx/6.7u3/windows/x64/ Use win_get_url module and win_command_module

Re: [ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Ikhsan Faruqi
I solve the problem by change double quote to single quote in the task that render item from loop. On Tue, May 19, 2020 at 7:12 PM Dick Visser wrote: > Is that the same error? > > Because @Stefan Hornburg (Racke) is right, if you look closely at the > FIRST error: > > "msg": "value of method

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

2020-05-19 Thread Dick Visser
https://docs.ansible.com/ansible/latest/modules/vmware_guest_tools_upgrade_module.html#vmware-guest-tools-upgrade-module On Tue, 19 May 2020 at 15:56, Tony Wong wrote: > > IS there a playbook or how do i start with installing and upgrading vmware > tools on windows vm > > for VM with no tools

[ansible-project] how to run an if/else test in a task

2020-05-19 Thread Jerome Meyer
Hi Teams, I'm looking for to do a test before to execute a task. I need to checkup if my computer has already joined the domain before to join it. otherwise, the adcli will failed. When computer isn't in domain, the klist will return a "not found" message and at this time the "join active

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

2020-05-19 Thread Tony Wong
IS there a playbook or how do i start with installing and upgrading vmware tools on windows vm for VM with no tools installed I need to 1. mount the vmware tools iso 2. run the setup64.exe /S /v “/qn REBOOT=R ADDLOCAL=ALL” any idea how to start with this? -- You received this message

Re: [ansible-project] Copy a folder from remote host to local using Ansible.

2020-05-19 Thread Vladimir Botka
On Tue, 19 May 2020 05:41:30 -0700 (PDT) Divya Punna wrote: > copy a folder from remote host to local Try - hosts: remote_host tasks: - synchronize: mode: pull src: "{{ dir_on_remote_host }}" dest: "{{ dir_on_localhost }}" -- You received this

Re: [ansible-project] Copy a folder from remote host to local using Ansible.

2020-05-19 Thread Stefan Hornburg (Racke)
On 5/19/20 2:41 PM, Divya Punna wrote: > Can anyone help/suggest on how to copy a folder from remote host to local > using Ansible? Appreciate any quick help on this > What about synchronize module? Regards Racke > -- > You received this message because you are subscribed to the

[ansible-project] Getting the version of an Ansible Galaxy role

2020-05-19 Thread 'Pablo Baeyens' via Ansible Project
Hi, I want to know the version of a role (from Galaxy) from inside that role ( versions correspond to git tags in the source repo). Is there any special variable I can get with the version of a role being executed? Any other

[ansible-project] Re: vmotion condition

2020-05-19 Thread David Foley
Hi Mani, Your best bet would be to use PowerCLI, https://communities.vmware.com/thread/539904?start=15=0 -- 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] Copy a folder from remote host to local using Ansible.

2020-05-19 Thread Divya Punna
Can anyone help/suggest on how to copy a folder from remote host to local using Ansible? Appreciate any quick help on this -- 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,

Re: [ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Dick Visser
Is that the same error? Because @Stefan Hornburg (Racke) is right, if you look closely at the FIRST error: "msg": "value of method must be one of: trust, reject, md5, password, gss, sspi, krb5, ident, peer, ldap, radius, cert, pam, scram-sha-256, got: trust "} You can see that it has an extra

Re: [ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Ikhsan Faruqi
No, it is not the problem, I tried removing whitespace, and it still errors. On Tuesday, May 19, 2020 at 6:14:27 PM UTC+7, Stefan Hornburg (Racke) wrote: > > On 5/19/20 1:08 PM, Ikhsan Faruqi wrote: > > Hi stefan, sorry I forgot to put my playbook, here what it looks like > > > > | > > -

Re: [ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Stefan Hornburg (Racke)
On 5/19/20 1:08 PM, Ikhsan Faruqi wrote: > Hi stefan, sorry I forgot to put my playbook, here what it looks like > > | > - name: PostgreSQL | Add new HBA records. >   become: yes >   postgresql_pg_hba: >     dest: "{{ postgresql_hba_file_path }}" >     contype: "{{ item.hba_connection_type }}" >  

Re: [ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Ikhsan Faruqi
Hi stefan, sorry I forgot to put my playbook, here what it looks like - name: PostgreSQL | Add new HBA records. become: yes postgresql_pg_hba: dest: "{{ postgresql_hba_file_path }}" contype: "{{ item.hba_connection_type }}" users: "{{ item.hba_users }}" source: "{{

[ansible-project] Install pmm-client using ansible playbook

2020-05-19 Thread kaoutar idbelkacem
Hi every one in the group :) I m traying to deploye pmm-client on my machine using this play book --- > - hosts: all > become: yes > vars: > pmm_client_install: true > pmm_client_enabled: true > pmm_client_server_host: *.*.*.* > pmm_client_server_port: 80 > # If the

Re: [ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Stefan Hornburg (Racke)
On 5/19/20 12:44 PM, Ikhsan Faruqi wrote: > Hi, I trying to add new hba_records using pg_hba_module > >  but got this error: > > | >

[ansible-project] Can't add new postgresql_hba records using postgresql_hba module

2020-05-19 Thread Ikhsan Faruqi
Hi, I trying to add new hba_records using pg_hba_module but got this error: failed: [pg-12] (item={'hba_database': 'test-db', 'hba_users': 'johndoe', 'hba_connection_type': 'host', 'hba_source': '0.0.0.0/0',