Re: [ansible-project] Ansible Expect module not responding to questions

2018-12-03 Thread Diptajeet Khan
Hi Kai, I got the same command working via 'shell' module & interact via - spawn/expect/send. Though I am still wondering why pexpect doesn't do the same when I can see that the script does get triggered from process logs. BR On Tue, Dec 4, 2018, 1:17 PM Kai Stian Olstad < ansible-project+l...@

Re: [ansible-project] Ansible Expect module not responding to questions

2018-12-03 Thread Kai Stian Olstad
On 04.12.2018 00:02, Diptajeet Khan wrote: Thanks Kai! Yes was wondering about that but unfortunately the script ' /root/dadock-installer/assets/bin/configure.sh' interact when ran manually. Might be that the script detect it's not running interactively. Since it's a shell script it should be

[ansible-project] Ansible playbook to check disk space is failing

2018-12-03 Thread anushakeshipeddy4
Hi Experts, I am trying to check the diskspace on remote servers but it failing . Could someone please help. Playbook.yml --- - hosts: all gather_facts: no vars_files: - /etc/ansible/xyz/pre-deploy/vars/main.yml tasks: - name: Ensure that free space on the tested volume is greate

[ansible-project] Re: The installed version of WinRM does not support transport(s) [u'']

2018-12-03 Thread Jordan Borean
It sounds like you have the variable 'ansible_winrm_transport' defined to an empty string. Thanks Jordan -- 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 an

Re: [ansible-project] Roles Concept in ansible 2.7 version

2018-12-03 Thread VJ49
[image: error2.PNG] Hi, This is the code.. Have a look... On Monday, December 3, 2018 at 11:32:00 AM UTC-8, Jordan Borean wrote: > > Can you share the actual output. I’m not aware of any syntax changes to > roles. It sounds like the block issue is in the role you are calling and > not the play

[ansible-project] Failed to create new process - win_command

2018-12-03 Thread yyellapragada
Hello Team, I am trying to install an AV agent on a windows machine and I get this error: fatal: [10.217.25.55]: FAILED! => { "changed": false, "cmd": "\\[machine]\[path]\Setup.exe -updp "\\[machine name]\ [path]" -user "domain\user" -pwd "password" -mng yes -ni", "msg": "Exce

[ansible-project] Declare variable user created with limits

2018-12-03 Thread COUSSI Matthieu
Hi, I have a variable with this structure where i declare the users that i have to create. struct : users: - { name: user1, uid: 2001,shell: /bin/sh,group: grp1, groups: grp2,home: /home/user1 } - { name: user2, uid: 2002,shell: /bin/sh,group: grp1, groups: grp

[ansible-project] The installed version of WinRM does not support transport(s) [u'']

2018-12-03 Thread ameya agashe
Hello there, I'm trying to configure a bunch of Windows machines through Ansible and installed pywinrm correctly but Ansible is throwing an error message. Command: ansible-playbook -i inventory/hosts playbooks/common.yml -vvv Error Message: ASK [Gathering Facts] *

Re: [ansible-project] Find all instances, and build a list

2018-12-03 Thread John Harmon
On Monday, December 3, 2018 at 4:48:43 PM UTC-7, Piotr Owcarz wrote: > > Hi > Read the file contents with the 'file' lookup > https://docs.ansible.com/ansible/2.6/plugins/lookup/file.html then run > regexp filter on the lookup result: > https://docs.ansible.com/ansible/2.5/user_guide/playbooks

Re: [ansible-project] Find all instances, and build a list

2018-12-03 Thread Piotr Owcarz
Hi Read the file contents with the 'file' lookup https://docs.ansible.com/ansible/2.6/plugins/lookup/file.html then run regexp filter on the lookup result: https://docs.ansible.com/ansible/2.5/user_guide/playbooks_filters.html#regular-expression-filters eg: "{{ lookup('file', '/path/to/file') | reg

[ansible-project] Re: Find all instances, and build a list

2018-12-03 Thread John Harmon
I am trying the following, but it isn't quite working like I hoped: - name: Gather current virtual disks lineinfile: path: "{{ file }}" regexp: (\w+.img) line: '' check_mode: yes register: virt_disk Result (debug of virt_disk): ok: [myftpserver] => {

Re: [ansible-project] Re: Using "shell" with a switch

2018-12-03 Thread Piotr Owcarz
Dimitri, - shell: "su - root" args: warn: false - shell: '/scripts/dnscopy.pl -f' register: (result) You are running 2 separate shells. First shell runs su - root then exits - this is not doining anything. Then secon task runs in a new shell, you are not leveraging the

[ansible-project] Find all instances, and build a list

2018-12-03 Thread John Harmon
I have a file, as an example, with the following content: disk = [file:/OVS/Repositories/0004fb03df2ee11376f1cd94/VirtualDisks /b7558d7745c14b02806d08f8003906e1.img,xvda,w,phy:/OVS/Repositories/ 0004fb03df2ee11376f1cd94/VirtualDisks/ 0004fb12049ec392e534e039,xvdb,w,file:/OVS

Re: [ansible-project] Ansible Expect module not responding to questions

2018-12-03 Thread Diptajeet Khan
Thanks Kai! Yes was wondering about that but unfortunately the script ' /root/dadock-installer/assets/bin/configure.sh' interact when ran manually. BR On Tue, Dec 4, 2018, 12:26 AM Kai Stian Olstad < ansible-project+l...@olstad.com wrote: > On Sunday, 2 December 2018 17:57:03 CET Diptajeet Kha

[ansible-project] Re: Using "shell" with a switch

2018-12-03 Thread Dimitri Yioulos
OK: --- > - hosts: all > gather_facts: false > become: yes > # become_user: root > # become_method: su > tasks: > - shell: "su - root" > args: > warn: false > - shell: '/scripts/dnscopy.pl -f' > register: (result) > - debug: > var: (result) >

Re: [ansible-project] Using "shell" with a switch

2018-12-03 Thread Piotr Owcarz
Hey Dimitri, Why don't you send us your code and the output you are receiving? Piotr pon., 3 gru 2018 o 17:44 Dimitri Yioulos napisał(a): > Hey, all. > > I need to run a script residing on the remote machine with a switch, as in > "/scripts/myscript -f" (it must be executed by root). I'm u

Re: [ansible-project] Re: replace module issue

2018-12-03 Thread Piotr Owcarz
Hi Visar As for the IHS plugin file modification try using the Ansible's xml module: https://docs.ansible.com/ansible/2.4/xml_module.html As for the mail, you are writing, that your playbook fails, but you don't send us any output. Run your playbook with -vvv and see what's wrong. Also, note, tha

Re: [ansible-project] Re: Is anyone using human-readable callback plugin? (human_log.py)

2018-12-03 Thread Brian Coca
@Minal Deshmukh https://docs.ansible.com/ansible/latest/plugins/callback.html#enabling-callback-plugins -- -- 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

Re: [ansible-project] Re: "kerberos: (u'http', u'Bad HTTP response returned from server. Code 500'), plaintext: the specified credentials were rejected by the server"

2018-12-03 Thread sateesh s
I tried with Kerberos I am getting error Msg: Kerberos: requested with method is jerboas, but request- kerbose is not installed I tried to run cmd pip install request-kerberos But firewall restricting Is there any other way Thanks On Mon, Dec 3, 2018 at 12:58 PM Nk Chitturi wrote: > Use Kerb

Re: [ansible-project] Roles Concept in ansible 2.7 version

2018-12-03 Thread Jordan Borean
Can you share the actual output. I’m not aware of any syntax changes to roles. It sounds like the block issue is in the role you are calling and not the playbook. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this grou

Re: [ansible-project] Ansible Expect module not responding to questions

2018-12-03 Thread Kai Stian Olstad
On Sunday, 2 December 2018 17:57:03 CET Diptajeet Khan wrote: > "msg": "command exceeded timeout", > > "rc": null, > > "start": "2018-12-02 21:26:00.229973", > > "stdout": "", > > "stdout_lines": [] > > } Your stdout is empty, that means your program have not prompted any

Re: [ansible-project] Re: "kerberos: (u'http', u'Bad HTTP response returned from server. Code 500'), plaintext: the specified credentials were rejected by the server"

2018-12-03 Thread Nk Chitturi
Use Kerbors it works. Sent from my iPhone > On Dec 2, 2018, at 4:27 PM, sateeshaz...@gmail.com wrote: > > hi, > > [webserver] > ssk.ms.com > > [webserver:vars] > ansible_user=windows > ansible_password=PWD > ansible_connection=winrm > ansible_winrm_transport=basic > ansible_winrm_scheme=http >

[ansible-project] Using "shell" with a switch

2018-12-03 Thread Dimitri Yioulos
Hey, all. I need to run a script residing on the remote machine with a switch, as in "/scripts/myscript -f" (it must be executed by root). I'm using the shell module, but can find no way to add the switch without the play failing. Help would be appreciated. Dimitri -- You received this mes

Re: [ansible-project] register output from shell command, match line to supplied value and return value of different column

2018-12-03 Thread Kai Stian Olstad
On Monday, 3 December 2018 15:03:54 CET 'Ansible Madness' via Ansible Project wrote: > > 1) run a shell command (ok this one is easy), it will return a list of > values in the format of: > > A B C D > D E F G > > 2) now i want to match a line with a value and return the value of a > DIFFE

[ansible-project] register output from shell command, match line to supplied value and return value of different column

2018-12-03 Thread 'Ansible Madness' via Ansible Project
merely looking for some suggestions how to perform the following actions in ansible 1) run a shell command (ok this one is easy), it will return a list of values in the format of: A B C D D E F G 2) now i want to match a line with a value and return the value of a DIFFERENT column.. so u

Re: [ansible-project] Roles Concept in ansible 2.7 version

2018-12-03 Thread VJ49
@Jonathan Lozada De La Matta ... I am not using Ansible lint. I specified only one role there that to be in correct manner. On Monday, December 3, 2018 at 4:48:39 AM UTC-8, Jonathan Lozada De La Matta wrote: > > Are you sing ansible lint? the issue might be spacing in your roles. > > On Mon

Re: [ansible-project] Roles Concept in ansible 2.7 version

2018-12-03 Thread Jonathan Lozada De La Matta
Are you sing ansible lint? the issue might be spacing in your roles. On Mon, Dec 3, 2018 at 7:23 AM VJ49 wrote: > > HI, > I am familiar with this ansible coding. Right now, ansible updated > to 2.7. While running/checking the syntax of a code. I am getting error as > a malformed block was

[ansible-project] executing command within --extra-vars

2018-12-03 Thread sushant kode
Hello, We are using mozilla sops to encrypt our ansible secrets and I want to decrypt the file on the go, something like ansible --extra-vars "@<$(sops -d secrets.yaml)" But ansible doesn't support executing a command within the 'extra-vars'. The workaround currently I am using is sops -d sec

[ansible-project] Re: ERROR! A malformed block was encountered while loading a block

2018-12-03 Thread VJ49
@Dick Visser..yes... May be there is any issue with role syntax when compare to ansible 2.7 version On Monday, December 3, 2018 at 4:18:06 AM UTC-8, VJ49 wrote: > > HI, > I am familiar with this ansible coding. Right now, ansible updated > to 2.7. While running/checking the syntax of a co

[ansible-project] Roles Concept in ansible 2.7 version

2018-12-03 Thread VJ49
HI, I am familiar with this ansible coding. Right now, ansible updated to 2.7. While running/checking the syntax of a code. I am getting error as a malformed block was encountered while loading a block. I found that problem is with ansible keyword "roles". In ansible 2.7, roles syntax ch

Re: [ansible-project] ERROR! A malformed block was encountered while loading a block

2018-12-03 Thread Dick Visser
This basic playbook looks ok so can it be that the issue is in your role? On Mon, 3 Dec 2018 at 13:18, VJ49 wrote: > HI, > I am familiar with this ansible coding. Right now, ansible updated > to 2.7. While running/checking the syntax of a code. I am getting error as > a malformed block was

Re: [ansible-project] Import/include ansible module

2018-12-03 Thread Kash
I have the python package downloaded in the virtual environment and am trying to use its ansible module in my playbook, no luck yet. Location for the package - /var/lib/awx/venv/ansible/lib/.. In the playbook - ---hosts: localhost tasks: - name: Job list tower_job_list:

Re: [ansible-project] Import/include ansible module

2018-12-03 Thread Kash
I have the python package downloaded in the virtual environment and am trying to use its ansible module in my playbook, no luck yet. Location for the package - /var/lib/awx/venv/ansible/lib/.. In the playbook - ---hosts: localhost tasks: - name: Job list tower_job_list:

[ansible-project] ERROR! A malformed block was encountered while loading a block

2018-12-03 Thread VJ49
HI, I am familiar with this ansible coding. Right now, ansible updated to 2.7. While running/checking the syntax of a code. I am getting error as a malformed block was encountered while loading a block. I found that problem is with ansible keyword "roles". In ansible 2.7, roles syntax cha

[ansible-project] ERROR! A malformed block was encountered while loading a block

2018-12-03 Thread VJ49
Hi, -- 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@googleg

[ansible-project] problem using os_loadbalancer task with keystone

2018-12-03 Thread Sergio Traldi
Hi, I have a host with ubuntu 18_04 and ansible 2.7: # dpkg --list | grep ansible ii ansible 2.7.3-1ppa~bionic all Ansible IT Automation and openstacksdk and pyhon-shade: # dpkg --list | grep shade ii python-shade1.7.0-2

Re: [ansible-project] Ansible and ip6tables

2018-12-03 Thread Anurag Bhatia
Hi Pshem The addition of ip_version: "ipv6" works perfectly. Thanks for your help. On Mon, Dec 3, 2018 at 4:40 AM Pshem Kowalczyk wrote: > > Google seems to index not the most recent version of the docs. Here's the > current version: > https://docs.ansible.com/ansible/latest/modules/iptable