Re: [ansible-project] Fwd: Us congress hearing of maan alsaan Money laundry قضية الكونغجرس لغسيل الأموال للمليادير معن الصانع

2019-04-03 Thread Raghavendra Rao
Dont forward such useless stuff on a purely technical group. On Wed, 3 Apr 2019, 03:45 safi al, wrote: > > > > > YouTube videos of > > > > U.S. Congress money laundering hearing > > > of > > Saudi Billionaire " Maan Al sanea" > > with *bank of America* > > > and The owner of Saad Hospital

[ansible-project] LDAP integration with ldap_entry module.

2019-04-03 Thread Nikhil
Hi, Am trying to interface with LDAP on Linux and creating a new user. if uid doesn't exist, then it should ideally create one. However, am getting below error. My ansible playbbok is as below: - name: LDAP user check hosts: LOCAL tasks: - name: check ldap entry ldap_entry:

[ansible-project] Ansible how to get output as variable without brackets and u

2019-04-03 Thread wanexa77
I have the result of a query from ansible and I tried to use the result as a variable My playbook is like this - name: Query oracle_sql: username: "{{ user }}" password: "{{ password }}" service_name: "{{ service_name }}" sql: "select smth from table where smth like 'OK_%'"

Re: [ansible-project] Ansible how to get output as variable without brackets and u

2019-04-03 Thread Stefan Hornburg (Racke)
On 4/3/19 11:35 AM, wanex...@gmail.com wrote: > I have the result of a query from ansible and I tried to use the result as a > variable > > My playbook is like this > > |-name:Queryoracle_sql:username:"{{ user }}"password:"{{ password > }}"service_name:"{{ service_name }}"sql:"select smth > fro

Re: [ansible-project] Ansible how to get output as variable without brackets and u

2019-04-03 Thread Jerome Denechaud
it works thanks a lot can you explain to me please about the [0][0] thanks in advance Le mer. 3 avr. 2019 à 11:42, Stefan Hornburg (Racke) a écrit : > On 4/3/19 11:35 AM, wanex...@gmail.com wrote: > > I have the result of a query from ansible and I tried to use the result > as a variable > > > >

Re: [ansible-project] Ansible how to get output as variable without brackets and u

2019-04-03 Thread Stefan Hornburg (Racke)
On 4/3/19 11:47 AM, Jerome Denechaud wrote: > it works thanks a lot can you explain to me please about the [0][0] > thanks in advance > OK, say you have the following query: select first_name, last_name from test_table With two results: Test | Tester Foo | Bar In your smth variable it will l

[ansible-project] How to copy directory from remote machine to ansible machine

2019-04-03 Thread amit ahuja
Hi, i want to know if there is any way to copy complete directory from remote machine to local ansible machine . i tried to used fetch method but it is copying files with complete path which i dont want . pls help . thanks Amit -- You received this message because you are subscribed to the Goog

Re: [ansible-project] How to copy directory from remote machine to ansible machine

2019-04-03 Thread Vinu Vajravel
SCP you tried ? On Wed, Apr 3, 2019 at 4:38 PM amit ahuja wrote: > Hi, > > i want to know if there is any way to copy complete directory from remote > machine to local ansible machine . i tried to used fetch method but it is > copying files with complete path which i dont want . pls help . > > t

Re: [ansible-project] How to avoid backslash and quote from variable

2019-04-03 Thread bikram40
Hi Thanks for your feedback I solved it using regular expression Bikram Sent from my iPhone > On Apr 2, 2019, at 11:28 PM, P. Varsha wrote: > > Hello, > I am not working on cisco switches but try once - "show run interface > "\Gi9/1\" | i no cdp" . > check your commands once your using - "

[ansible-project] Re: Ansible unable to except any other body format except raw and jason in the uri module and upload a zip or a jar via POST method

2019-04-03 Thread Fabio Martins
I am facing exactly the same issue when trying to upload a jar file over a Flink REST endpoint . I tried both with curl and postman, it works flawlessly, but using Ansible URI module, I am getting the

[ansible-project] Re: How to copy directory from remote machine to ansible machine

2019-04-03 Thread Tony Chia
If you don't want the complete path, you can set "flat: yes" in the fetch task and it will flatten the directory for you. --Tony On Wednesday, April 3, 2019 at 4:08:42 AM UTC-7, amit ahuja wrote: > > Hi, > > i want to know if there is any way to copy complete directory from remote > machine

[ansible-project] failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
playbook:- --- - name: Deploying PCC-test hosts: inplp01p2.infra.smf1.mobitv gather_facts: true vars_files: - /etc/ansible/inventories/mobitv/paytv.smf1.mobitv/group_vars/common.yaml vars: - rpmsearch: true - rpmname: - kunal serial: 1 any_errors_fatal: true roles

[ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
Can anyone help on this? On Wednesday, April 3, 2019 at 7:15:25 PM UTC+5:30, Kunalsing Thakur wrote: > > playbook:- > --- > - name: Deploying PCC-test > hosts: inplp01p2.infra.smf1.mobitv > gather_facts: true > vars_files: > - > /etc/ansible/inventories/mobitv/paytv.smf1.mobitv/group_v

[ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
playbook:- task:- - name: Deploying PCC-test hosts: pulp gather_facts: true vars_files: - /etc/ansible/inventories/group_vars/common.yaml vars: - rpmsearch: true - rpmname: - mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch serial: 1 any_errors_fatal: true role

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Raghavendra Rao
Hmmm... it should fail as the string is matched What happens when you do this instead?: - name: searching the rpm into pulp repo command: pulp-admin rpm repo content rpm --repo-id=mobi-snapshots --match 'filename={{ item }}' loop: "{{ rpmname | default([]) }}" register: pulpresult

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Raghavendra Rao
On Wed, 3 Apr 2019 at 19:52, Kunalsing Thakur wrote: > playbook:- > task:- > - name: Deploying PCC-test > hosts: pulp > gather_facts: true > vars_files: > - /etc/ansible/inventories/group_vars/common.yaml > vars: > - rpmsearch: true > - rpmname: > - mobi-auth-manager-5

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Stefan Hornburg (Racke)
On 4/3/19 4:22 PM, Kunalsing Thakur wrote: > playbook:- > task:- > - name: Deploying PCC-test >   hosts: pulp >   gather_facts: true >   vars_files: >     - /etc/ansible/inventories/group_vars/common.yaml >   vars: >     - rpmsearch: true >     - rpmname: >     - mobi-auth-manager-5.42.0-201903

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Sebastian Meyer
On 03.04.19 16:22, Kunalsing Thakur wrote: > --- > - name: Logging into pulp > shell: pulp-admin login -u admin -p admin > - name: searching the rpm into pulp repo > shell: pulp-admin rpm repo content rpm --repo-id=mobi-snapshots --match > 'filename={{ item }}' > with_items: "{{ rpmname | de

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread kunalsing thakur
TASK [mobi_ansible_role_pulp : invoke failure] *** task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:9 Wednesday 03 April 2019 14:32:02 + (0:00:02.598) 0:00:07.161 *** fatal: [node]: FAILED! => msg:

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
Wednesday 03 April 2019 14:32:02 + (0:00:02.598) 0:00:07.161 *** fatal: [node]: FAILED! => msg: |- The conditional check 'pulpresult.stdout == "\e[0m"' failed. The error was: error while evaluating conditional (pulpresult.stdout == "\e[0m"): 'dict object' has no attribute 's

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread kunalsing thakur
Thank You sebastian. Now i am able to print stdout using pulp.results.0.stdout On Wed, Apr 3, 2019 at 8:01 PM Sebastian Meyer wrote: > On 03.04.19 16:22, Kunalsing Thakur wrote: > > --- > > - name: Logging into pulp > > shell: pulp-admin login -u admin -p admin > > - name: searching the rpm in

[ansible-project] What is the parameter attribute to use VM storage Policy

2019-04-03 Thread himanshu gupta
Hi All, Can anyone please suggest. Thanks, Himanshu -- 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

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
Hi Rao, when i check with this condition failed_when: pulp.results.0.stdout == "\e[0m" it gives me following error TASK [mobi_ansible_role_pulp : searching the rpm into pulp repo] * task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
Hi sebastian, when i try to fail the task with this below condition i get the error in task *failed_when: pulp.results.0.stdout == "\e[0m"* TASK [mobi_ansible_role_pulp : searching the rpm into pulp repo] * task path: /etc/ansible/roles/mobi_ansib

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
when i print the pulp.results.0.stdout it will give me following output:- TASK [mobi_ansible_role_pulp : debug] task path: /etc/ansible/roles/mobi_ansible_role_pulp/tasks/pulp.yaml:9 Wednesday 03 April 2019 14:46:40 +000

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Sebastian Meyer
On 03.04.19 16:44, Kunalsing Thakur wrote: > Hi sebastian, > when i try to fail the task with this below condition i get the error in > task > > *failed_when: pulp.results.0.stdout == "\e[0m"* > > TASK [mobi_ansible_role_pulp : searching the rpm into pulp repo] > ***

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Raghavendra Rao
I see you used debug to get a verbose out from that specific command. Does that list stdout as one of the return values? -R.Rao On Wed, 3 Apr 2019 at 20:12, Kunalsing Thakur wrote: > Hi Rao, > when i check with this condition > failed_when: pulp.results.0.stdout == "\e[0m" > it gives me foll

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
Yes , pulp.results.0.stdout give me output "\e[0m" But when I try to access in failed_when condition It is giving me below error. fatal: [node]: FAILED! => msg: 'The conditional check ''pulp.results.0.stdout == "\e[0m"'' failed. The error was: error while evaluating conditional (pulp.results.0.

Re: [ansible-project] how to access debug stdout variable

2019-04-03 Thread Kunalsing Thakur
Hi sebastian, pulp.results.0.stdout give me output "\e[0m" But when I try to access in failed_when condition It is giving me below error. fatal: [node]: FAILED! => msg: 'The conditional check ''pulp.results.0.stdout == "\e[0m"'' failed. The error was: error while evaluating conditional (pulp.re

Re: [ansible-project] Re: Ansible unable to except any other body format except raw and jason in the uri module and upload a zip or a jar via POST method

2019-04-03 Thread Dick Visser
What does your task look like? Also, the original report is against 2.4.2 which by now is almost 1.5 years old, and the uri module has since seen a lot of changes. What version do you run? Dick On Wed, 3 Apr 2019 at 15:31, Fabio Martins wrote: > I am facing exactly the same issue when trying to

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Brian Coca
results only exists if you registered in a loop -- -- Brian Coca -- 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...@googleg

Re: [ansible-project] Re: How to copy directory from remote machine to ansible machine

2019-04-03 Thread Brian Coca
https://docs.ansible.com/ansible/latest/modules/synchronize_module.html see 'mode' specifically the 'pull' value -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emai

Re: [ansible-project] workaround for serial: 1 failures stopping the entire playbook?

2019-04-03 Thread Brian Coca
there are several ways, the simplest might be putting the whole thing in a 'block' with a 'rescue' that always succeeds so it will go to the next host. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscrib

Re: [ansible-project] more freedom and options for `run_once`

2019-04-03 Thread Brian Coca
I've really regretted the naming of this feature, its really `run_on_first_active_host_in_play_execution_apply_facts_and_register_to_all` , I don't think we can change the current nature of run_once from boolean to string choices, but I am in favor of a new option that does a better job of specifyi

Re: [ansible-project] How to write an Ansible Module that does not do the initial check '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''

2019-04-03 Thread Brian Coca
See the networking modules, specially those using network_cli as networking appliances have the same issue, ssh access but no real 'shell' environment. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] connection caching throughout a play

2019-04-03 Thread Brian Coca
Currently there is no way to do this, but it is something we have been thinking about for a while now as a feature. Just don't expect it anytime soon, as it is a complex ask, specially if you consider modules are not guaranteed to execute on the same machine. -- Brian Coca -- You recei

[ansible-project] Ansible with gpg-agent prompts for private key password constantly

2019-04-03 Thread Mark Clarke
Hi all, We are using gpg-agent to provide ssh-agent functionality for the caching the private key passphrases. Some of the keys will be stored in the gpg keyring whilst some services such as ansible uses a standard ssh key. Our ansible scripts run without problems with the standard ssh-agent. W

Re: [ansible-project] Ansible with gpg-agent prompts for private key password constantly

2019-04-03 Thread Brian Coca
Ansible does not deal with those, it executes an ssh command, use -vvv to see exactly the ssh command Ansible runs and see if any of those options need to be tweaked to allow for the gpg agent to continue working. -- -- Brian Coca -- You received this message because you are subscribe

Re: [ansible-project] ansible concatenate variables

2019-04-03 Thread Brian Coca
Variables are lazy loaded so : vars: x: '{{ x + [1] }}' will not work since the value of x is not known before you try to use x creating a self referential loop. But you can get around it with `set_fact` as we evaluate variables at the time of module execution and set_fact is a module that set

Re: [ansible-project] Ansible with gpg-agent prompts for private key password constantly

2019-04-03 Thread Derek Murawsky
What does your ~/.gnupg/gpg-agent.conf file? https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html It sounds almost like your auth socket isn't working properly. Meaning the agent is being restarted and is readding the key instead of using the key loaded in the agent once. On Wed,

[ansible-project] list containing any item of another list

2019-04-03 Thread Adam E
Hi, wondering if there is any cleaner way to see if two lists have 1 or more intersecting values? the following works for me # returns true > {{ ['value1', 'value2'] | intersect(['value1', 'value2']) | length > 0 }} > # returns false > {{ ['value3', 'value4'] | intersect(['value1', 'value2']) |

[ansible-project] purestorage sdk missing

2019-04-03 Thread Lucas Possamai
Hi guys. When calling a playbook I get the following error: FAILED! => {"changed": false, "msg": "purestorage sdk is required for this module in volume"} Purestorage sdk is installed in my laptop (i'm running that locally): purestorage (1.16.0) ansible 2.7.9 config file = /etc/ansible/ansible.

[ansible-project] var for --ask-pass ?

2019-04-03 Thread sergey . mihailov
I start playbook : ansible-playbook win_install_ascon.yml --ask-pass define in playbook: ... ansible_become_pass: "{{ remote_pass }}" ... OUT: ... FAILED! => {"msg": "The field 'become_pass' has an invalid value, which includes an undefined variable. The error was: 'remote_pass' is undefined"}

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
Hi Brian, I have registered results. i am able to access the content using pulp.results.[0].stdout. if nothing is found stdout prints this "\e[0m". And i want to compare this string to failed the task using failed_when condition. but somehow it gives me below error. fatal: [pulp]: FAILED! => msg:

Re: [ansible-project] var for --ask-pass ?

2019-04-03 Thread Raghavendra Rao
On Thu, 4 Apr 2019 at 11:49, wrote: > I start playbook : ansible-playbook win_install_ascon.yml --ask-pass > > define in playbook: > ... > ansible_become_pass: "{{ remote_pass }}" > ... > > OUT: > ... > FAILED! => {"msg": "The field 'become_pass' has an invalid value, which > includes an undefin

Re: [ansible-project] Re: failed_when not working for empty sting output in task output

2019-04-03 Thread Kunalsing Thakur
is there any example which i refer like this to get sorted out? On Thu, Apr 4, 2019 at 11:55 AM Kunalsing Thakur wrote: > Hi Brian, > I have registered results. i am able to access the content using > pulp.results.[0].stdout. if nothing is found stdout prints this "\e[0m". > And i want to compar

Re: [ansible-project] purestorage sdk missing

2019-04-03 Thread Raghavendra Rao
Make sure you have the respective purestorage python library. Also, set PUREFA_URL and PUREFA_API environment variables if *url* and *api_token* arguments are not passed to the module directly. -R.Rao On Thu, 4 Apr 2019 at 10:05, Lucas Possamai wrote: > Hi guys. > > When calling a playbook I g

Re: [ansible-project] var for --ask-pass ?

2019-04-03 Thread sergey . mihailov
its for windows. Those are not possible to take one variable from the command line and I will have to type the same password twice? четверг, 4 апреля 2019 г., 10:36:58 UTC+4 пользователь Raghavendra Rao написал: > > On Thu, 4 Apr 2019 at 11:49, > wrote: > >> I start playbook : ansible-playbook