[ansible-project] How to make Ansible Tasks work with Packer

2019-04-04 Thread Tony Chia
There is no limitation which task can be run from packer. Try adding - when you execute from packer and from outside of packer and compare the results Regards Tony Chia -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] purestorage sdk missing

2019-04-04 Thread Lucas Possamai
On Fri, 5 Apr 2019 at 06:15, David Baumann wrote: > Maybe forgot a delegate_to and you execure the module on remote host? > I am not executing the module on remote host. It is locally. This is the yaml file: --- # Perform PURE Flasharray Database snapshots - name: perform PURE volume snapshot

[ansible-project] Re: open(module, 'wb') SyntaxError for raw module in ansible-playbook

2019-04-04 Thread Henry Iracheta
That worked, thank you very much ! On Thursday, April 4, 2019 at 10:59:16 AM UTC-5, Henry Iracheta wrote: > > I am trying to use Ansible on a remote host that has a version of Python > 2.4.3 installed. My understanding is that a more recent version of > Python is required to properly use

[ansible-project] How to make Ansible Tasks work with Packer

2019-04-04 Thread gigit1000
Hello, I’m trying to use Ansible as a provisioner with Packer. I have a playbook with tasks that: -create a local directory (win_file) -download a file from s3 (aws_s3) -run windows updates (win_updates) It works fine when I run it manually, but when I run it from Packer (Ansible

[ansible-project] Re: Ansible winrm for non domain joined devices and domain joined

2019-04-04 Thread Jordan Borean
Kerberos is by far the best authentication method to use but unfortunately that only works for domain accounts. If you need to use local accounts, CredSSP is ok but you do need to be aware of the unconstrained delegation of credentials it introduces. In the end if you need to auth with a local

Re: [ansible-project] ansible uri and body format

2019-04-04 Thread Jerome Denechaud
thanks a lot Le jeu. 4 avr. 2019 à 16:57, Matt Martz a écrit : > You want: > >body_format: json >body: > specs: > - id: "{{ item.0.uuid }}" > name: "{{ item.2 }}" > > On Thu, Apr 4, 2019 at 4:41 AM wrote: > >> Here are my body's model >> >> { >> "specs": [ >> {

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

2019-04-04 Thread Brian Coca
if you do --ask-pass and --ask-become-password, you only need to enter it once, the 2nd defaults to the first. -- -- 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

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

2019-04-04 Thread Brian Coca
''pulp.results.[0].std" is incorrect you have extra . "pullp.results[0].std" is the correct form -- -- 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,

[ansible-project] Re: New Ansible release 2.7.10 and 2.6.16

2019-04-04 Thread Nikhil
Hi, I installed default ansible with 2.7.9 with python 2.6,but for one of LDAP module's issue, I need ansible 2.7.9 with python3.6 modules. Can you please guide me how to install the same? Regards, Nikhil On Thursday, April 4, 2019 at 11:28:59 PM UTC+5:30, Toshio Kuratomi wrote: > > Hi all-

[ansible-project] Ansible winrm for non domain joined devices and domain joined

2019-04-04 Thread Seth Daemen
We use a lot of windows devices. They are installed with the windows deployment toolkit and after that i want to run ansible playbooks on it to join domain and some other settings. Which winrm authentication can we best configure for security. I think credsp is the best in this solution

Re: [ansible-project] mysql_db module issue

2019-04-04 Thread 'Felix Fontein' via Ansible Project
Hi, it could be related to the change from MySQLdb to PyMySQL; see https://github.com/ansible/ansible/issues/47736 and in particular https://github.com/ansible/ansible/issues/47736#issuecomment-479745979 I wouldn't be surprised if you have PyMySQL installed on the new system, and MySQLdb

[ansible-project] mysql_db module issue

2019-04-04 Thread William Muriithi
Hello, I have an old task that works on an previous system but fail to work in the new system. I am certain it hasn't changed through git log but I have updated ansible on control system. I don't see other people raising the issue so not confident it's a bug. Have anyone observed something

Re: [ansible-project] Splunk Administror

2019-04-04 Thread Mauricio Tavares
On Thu, Apr 4, 2019 at 1:30 PM Ankit Vashistha wrote: > > Can we ban the spammers? > What? Doesn't receiving a cold call spamming email on a mailing list make you want to drop what you are doing and do business with the spammer's (who does not even use a corporate email account, another

Re: [ansible-project] open(module, 'wb') SyntaxError for raw module in ansible-playbook

2019-04-04 Thread Sebastian Meyer
On 04.04.19 17:59, Henry Iracheta wrote: > Here is an example of the playbook being tested: > > - hosts: servers > remote_user: x > tasks: > - name: simply test to confirm playbook works > raw: /bin/hostname > > > Any suggestions on how to work around this issue ? You

[ansible-project] New Ansible release 2.7.10 and 2.6.16

2019-04-04 Thread Toshio Kuratomi
Hi all- we're happy to announce that the general release of Ansible 2.7.10 and 2.6.16 is now available! How do you get it? -- $ pip install ansible==2.7.10 --user or $ pip install ansible==2.6.16 --user The tar.gz of the release can be found here: * 2.7.10

Re: [ansible-project] Splunk Administror

2019-04-04 Thread Ankit Vashistha
Can we ban the spammers? On Thu, Apr 4, 2019, 10:07 PM Recruiter Soni wrote: > *Hi,* > > > > *Hope you’re doing well!* > > *This is Chintan from Inficare Technologies, please find the job > description if you are interested for this below job reply to this email

Re: [ansible-project] purestorage sdk missing

2019-04-04 Thread David Baumann
Maybe forgot a delegate_to and you execure the module on remote host? -- 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] Re: How to execute a playbook before a role?

2019-04-04 Thread John Harmon
Thanks Brian! -- 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

Re: [ansible-project] How to execute a playbook before a role?

2019-04-04 Thread Brian Coca
you cannot have a play inside a play, - import_playbook cannot be in a task section, but easy enough to do what you want: - import_playbook: /etc/ansible/playbooks/one-offs/update_gitlab_scripts.yml - hosts: "{{ host}}" roles: -- -- Brian Coca -- You received this message

[ansible-project] How to execute a playbook before a role?

2019-04-04 Thread John Harmon
This doesn't work of course, but shows what I am trying to do. I wish to call a playbook before a couple of roles. How might I do this? Doesn't work, but is an explanatory example: --- - hosts: "{{ host }}" pre_tasks: - name: Import gitlab playbook import_playbook:

[ansible-project] Splunk Administror

2019-04-04 Thread Recruiter Soni
*Hi,* *Hope you’re doing well!* *This is Chintan from Inficare Technologies, please find the job description if you are interested for this below job reply to this email ID chin...@inficaretech.com with your updated resume and active contact number and

Re: [ansible-project] open(module, 'wb') SyntaxError for raw module in ansible-playbook

2019-04-04 Thread Matt Martz
Ansible no longer supports Python 2.4 on target hosts. The last version to support Python 2.4 was Ansible 2.3. On Thu, Apr 4, 2019 at 10:59 AM Henry Iracheta wrote: > I am trying to use Ansible on a remote host that has a version of Python > 2.4.3 installed. My understanding is that a more

[ansible-project] open(module, 'wb') SyntaxError for raw module in ansible-playbook

2019-04-04 Thread Henry Iracheta
I am trying to use Ansible on a remote host that has a version of Python 2.4.3 installed. My understanding is that a more recent version of Python is required to properly use Ansible; however, I should be able to use the "raw" module for such older Python environments. I am able to successfully

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

2019-04-04 Thread Derek Murawsky
So, the way I've seen the gpg-agent work is that it needs config to enable ssh-agent compatibility. My config looks like: default-cache-ttl 60 max-cache-ttl 120 enable-ssh-support That last line is what enables the auth socket with full compatibility with the ssh-agent I think. My bash_profile

Re: [ansible-project] ansible uri and body format

2019-04-04 Thread Matt Martz
You want: body_format: json body: specs: - id: "{{ item.0.uuid }}" name: "{{ item.2 }}" On Thu, Apr 4, 2019 at 4:41 AM wrote: > Here are my body's model > > { > "specs": [ > { > "name": "test", > "id": "7dcf2db8-858e-4c00-bbde-e0c5c734770c" > } >

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

2019-04-04 Thread Mark Clarke
On Wednesday, 3 April 2019 23:41:54 UTC+2, Derek Murawsky wrote: > > 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

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

2019-04-04 Thread James Cassell
On Thu, Apr 4, 2019, at 2:18 AM, sergey.mihai...@gmail.com wrote: > I start playbook : ansible-playbook win_install_ascon.yml --ask-pass > > define in playbook: > ... > ansible_become_pass: "{{ remote_pass }}" ansible_become_password: "{{ ansible_password }}" V/r, James Cassell > ... > >

[ansible-project] template Text Area value from AWX survey

2019-04-04 Thread guhan kumar
Hi All, I have to create the variable in group vars as below disk: - { device: /dev/sdb pvname: /dev/sdb1 } - { device: /dev/sdc pvname: /dev/sdc1 } i am getting disks name from job template survey i textarea , while templating it with below i am getting the error as list cant mapped

[ansible-project] Re: Module yum: update revision

2019-04-04 Thread Soniya panwar
Hello Ricardo, You can not update the version to its latest revision using "state= latest". State "latest" will update the specified package if it's not of the latest available version. In your case, it will update your package to the latest available version which is "my-rpm1-1.3.0-1". To

[ansible-project] ansible uri and body format

2019-04-04 Thread wanexa77
Here are my body's model { "specs": [ { "name": "test", "id": "7dcf2db8-858e-4c00-bbde-e0c5c734770c" } ] } trying to convert this last for uri module body_format: json body: specs: id: "{{ item.0.uuid }}" name: "{{ item.2 }}" how to convert this

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

2019-04-04 Thread Kunalsing Thakur
ansible task not failed still its passing. On Thu, Apr 4, 2019 at 2:20 PM Kunalsing Thakur wrote: > Hi kai, > thanks for information. > i tried below condition > failed_when: pulp.stdout == "\\e[0m" > failed_when: pulp.stdout == '\e[0m' > failed_when: pulp.stdout == "\\e[0m" >

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

2019-04-04 Thread Kunalsing Thakur
Hi kai, thanks for information. i tried below condition failed_when: pulp.stdout == "\\e[0m" failed_when: pulp.stdout == '\e[0m' failed_when: pulp.stdout == "\\e[0m" failed_when: pulp.stdout == "\e[0m" failed_when: "'e[0m' in pulp.stdout" i tried all stuff but no luck any new

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

2019-04-04 Thread Kai Stian Olstad
On 04.04.2019 09:47, Kunalsing Thakur wrote: - name: Logging into pulp shell: pulp-admin login -u admin -p admin - name: searching the rpm into {{ reponame }} repo shell: pulp-admin rpm repo content rpm --repo-id={{reponame}} --match 'filename={{ item }}' loop: "{{ rpmname | default([])

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

2019-04-04 Thread Kunalsing Thakur
- name: Logging into pulp shell: pulp-admin login -u admin -p admin - name: searching the rpm into {{ reponame }} repo shell: pulp-admin rpm repo content rpm --repo-id={{reponame}} --match 'filename={{ item }}' loop: "{{ rpmname | default([]) }}" register: pulp when: search is defined

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

2019-04-04 Thread Kunalsing Thakur
can you tell me what should be written in role? i am trying to understand but can't intepret in role. On Thu, Apr 4, 2019 at 1:06 PM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 04.04.2019 08:25, Kunalsing Thakur wrote: > > Hi Brian, > > I have registered results. i am able

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

2019-04-04 Thread Kai Stian Olstad
On 04.04.2019 08:25, 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 compare this string to failed the task using failed_when condition. but somehow it

Re: [ansible-project] purestorage sdk missing

2019-04-04 Thread Lucas Possamai
On Thu, 4 Apr 2019 at 19:45, Raghavendra Rao wrote: > Make sure you have the respective purestorage python library. > I already have it. [lucas@thanos ~]$ pip list | grep 'purestorage' purestorage (1.16.0) > > Also, set PUREFA_URL and PUREFA_API environment variables if *url* and >

[ansible-project] Re: \e[0m comapre this string in failed_when condition

2019-04-04 Thread Kunalsing Thakur
or is there way we can compare empty string. On Thursday, April 4, 2019 at 12:30:45 PM UTC+5:30, Kunalsing Thakur wrote: > > Hello Team, > When i was checking for string comparison in failed_when condition. > the ansible task does not give any output if search is not found. but it > will

[ansible-project] \e[0m comapre this string in failed_when condition

2019-04-04 Thread Kunalsing Thakur
Hello Team, When i was checking for string comparison in failed_when condition. the ansible task does not give any output if search is not found. but it will print stdout variable as stdout: "\e[0m" But when i try to compare my ansible playbook gives error. I tried two ways in codition:- 1)

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

2019-04-04 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

Re: [ansible-project] purestorage sdk missing

2019-04-04 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

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

2019-04-04 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

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

2019-04-04 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

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

2019-04-04 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! =>

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

2019-04-04 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"}