[ansible-project] Unable to join the worker with mastr node ip registered

2018-02-15 Thread Kalidoss Thiyagarajan
Not working on dockerce 17.0 version -- 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,

[ansible-project] Is it possible to associate a host to a variable?

2018-02-15 Thread Edson D'Agostini
Greetings, Would you please let me know if there is a way of associating a host with a variable. In other words, I have in one test inventory file something like his: nodenameA nodeNumber=1 nodenameB nodeNumber=2 nodenameC nodeNumber=3 This works well when running from the CLI, but as now it

[ansible-project] Re: doubt

2018-02-15 Thread Dark Night
Thanks for your support im a beginner for ansible can u rebuild to this one --- - hosts: local tasks: - name: pull an image docker_image: - name: ubuntu:latest im also getting this error ERROR! unexpected parameter type in action: tasks:

Re: [ansible-project] How to execute code before task if the task has changed?

2018-02-15 Thread Brian Coca
Just use a pair of tasks before the copy, one verifying if the copy is needed, 2nd stoping the service if that is the case. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] ansible-valult encrypt_string and adhoc command usage - how to ?

2018-02-15 Thread Narahari 'n' Savitha
Friends: I am trying to understand how to do something. I am not even sure it is possible. Try to help me please. Thank you in advance for your help. End User types in user id and password on jenkins screen. I then want to encrypt that password with vault and write that to a file say

Re: [ansible-project] JSON Query Filter Help

2018-02-15 Thread Matt Martz
That is correct. On Thu, Feb 15, 2018 at 5:50 PM Tito Valentin wrote: > @Matt - that worked perfectly. I'm assuming that the jinja2 pipeline you > added as a sample works as follows: > > It pipes the results from my results variable grabbing only the > json.statuses data

Re: [ansible-project] JSON Query Filter Help

2018-02-15 Thread Tito Valentin
@Matt - that worked perfectly. I'm assuming that the jinja2 pipeline you added as a sample works as follows: It pipes the results from my results variable grabbing only the json.statuses data structure, selects the attribute *name *that matches the value *Lucene* and from that data structure

[ansible-project] Why file fail when directory exists?

2018-02-15 Thread leam hall
I'm creating a mount point for an ISO image, and a later task puts the mount point in fstab. Why is the file module erroring after the ISO is mounted? The directory exists so the task shouldn't try to recreate it. ### 148 - name: make_build_repo_dir 149 file: 150 path:

Re: [ansible-project] ansible ping failure

2018-02-15 Thread 0x4e6f43 676573
Matt, You're correct. I was looking at the error message and had the same realization that i probably needed to install python on the remote host. After checking the python version on the remote host i found that python2 wasnt installed. installed, tested and passed. On Thursday, February

Re: [ansible-project] JSON Query Filter Help

2018-02-15 Thread Matt Martz
Honestly, I try to stay away from json_query when possible, and stick to just standard jinja2 pipelines: "{{ (results.json.statuses|selectattr('name', 'match', 'Lucene')|list|first).isHealthy }}" You can use a variety of tests instead of `match`, such as `search` or `equalto`. On Thu, Feb 15,

[ansible-project] JSON Query Filter Help

2018-02-15 Thread Tito Valentin
I have a task that hits a url and returns the results in JSON array like this: 1. > >"json": { > "statuses": [ > { > "application": "JIRA", > "completeKey": "com.atlassian.jira.plugins.jira- >

Re: [ansible-project] ansible ping failure

2018-02-15 Thread Matt Martz
The ping module is a full round trip test for ansible (not ICMP). It attempts to ssh to the host, invoke python on the remote host, use the python JSON module to return data. Looking at the error, your remote host is missing python at `/usr/bin/python`. You may either need to install python on

[ansible-project] ansible ping failure

2018-02-15 Thread 0x4e6f43 676573
*** New to ansible & linux *** I've installed ansible on a ZorinOS vm and am attempting (with no luck) to ping a host in the /etc/ansible/hosts file. I can ssh to the host and can also scp files from ansible to the host. Got to be a simple fix... ZorinOS version: 12 Ansible version: 2.4.3.0

[ansible-project] ansible script module fails in ansible 2.3.1

2018-02-15 Thread anil kumar
Hello, I am running powershell script using script module on ansible core 2.3.1.0. But it works on older version ansible core 2.2. Is this a bug in ansible 2.3 and higher version, any fixes or any workarounds would be appreciated. = - hosts: win

[ansible-project] Re: How does Ansible works when ansbile user can't get enter-pssession

2018-02-15 Thread Jordan Borean
I don't know off the top of my head the native ways of configuring the PSRP endpoint but usually the Set-PSSessionConfiguration cmdlet in Powershell (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/set-pssessionconfiguration?view=powershell-5.1) woud be a good

[ansible-project] Re: win_scheduled_task : run the scheduled task every minute

2018-02-15 Thread Jordan Borean
Not in any easy idempotent way unfortunately, you have some options, you could; * Use win_command/win_shell to create the task but the COM API used can get quite complex and dealing with idempotency would be difficult * You can copy the newer version of the module

Re: [ansible-project] Looping through registered lines

2018-02-15 Thread Ian Barrere
I see. Referencing the 0 explicitly on the end has resolved the problem. Thanks! Ian On Thursday, February 15, 2018 at 1:21:15 PM UTC-7, Kai Stian Olstad wrote: > > On Thursday, 15 February 2018 20.44.16 CET Ian Barrere wrote: > > If I use the operator "with_items", this works correctly, as

[ansible-project] Looping through registered lines

2018-02-15 Thread Ian Barrere
I have a task for a Cisco device where I register zero or more lines to come back to later: - name: gather non-standard usernames ios_command: commands: - show running-config | include username register: usernames I would like the next task to run through each registered line

Re: [ansible-project] Run pre/post tasks once with serial 1

2018-02-15 Thread flowerysong
On Thursday, February 15, 2018 at 12:51:23 PM UTC-5, Michael Perzel wrote: > > Gah not quite there. I use meta_end play when I calculate that a patch > isn't relevant so that we don't spend time decomissioning a host that > doesn't need a patch. Problem is this skips the post_tasks if the last

Re: [ansible-project] letsencrypt module - account_key

2018-02-15 Thread Michael Bubb
Thank you On Wednesday, February 14, 2018 at 3:31:06 AM UTC-5, Felix Fontein wrote: > > Hi, > > > I am a little confused by what is needed in the account_key parameter. > > > > The docs say it is: > > > > *File containing the Let's Encrypt account RSA key.* > > *Can be created with openssl

[ansible-project] Re: os_server module rerun always fails

2018-02-15 Thread Sven Leupold
The full traceback is: Traceback (most recent call last): File "/tmp/ansible_4Xgtwd/ansible_module_os_server.py", line 773, in main() File "/tmp/ansible_4Xgtwd/ansible_module_os_server.py", line 761, in main _get_server_state(module, cloud) File

Re: [ansible-project] Run pre/post tasks once with serial 1

2018-02-15 Thread Kai Stian Olstad
On Thursday, 15 February 2018 18.51.22 CET Michael Perzel wrote: > Gah not quite there. I use meta_end play when I calculate that a patch > isn't relevant so that we don't spend time decomissioning a host that > doesn't need a patch. Problem is this skips the post_tasks if the last > server in

[ansible-project] Re: os_server module rerun always fails

2018-02-15 Thread Sven Leupold
--- # tasks file for detect-vm # Gather facts about all servers named test: - name: gather facts os_server_facts: server: test* - name: debuggi debug: var: openstack_servers called by: --- - name: detect vm hosts: localhost roles: - { role: detect-vm } debug shows: ok:

Re: [ansible-project] Run pre/post tasks once with serial 1

2018-02-15 Thread Kai Stian Olstad
On Thursday, 15 February 2018 18.25.40 CET Michael Perzel wrote: > Not sure if there is a more elegant way to say run on the last host. > > when: inventory_hostname == ansible_play_hosts[ ansible_play_hosts | length - > 1] when: inventory_hostname == ansible_play_hosts | last -- Kai Stian

[ansible-project] os_server module rerun always fails

2018-02-15 Thread Sven Leupold
Hi I wonder if you experience the same problem with os_server if you run an openstack playbook twice or more. If I run os_server after the initial vm setup was successful, it always fails. Destroying vm's with state: absent is working. Uh! Any idea or is this just "normal" behaviour in

Re: [ansible-project] Run pre/post tasks once with serial 1

2018-02-15 Thread Michael Perzel
Gah not quite there. I use meta_end play when I calculate that a patch isn't relevant so that we don't spend time decomissioning a host that doesn't need a patch. Problem is this skips the post_tasks if the last server in the group isn't relevant. I tried using handlers but that results in 1

[ansible-project] Re: Marshalling Cisco AireOS/WLC devices with ansible

2018-02-15 Thread Christer Hemgren
On what aireos version do you have this working? Regards Christer -- 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: win_scheduled_task : run the scheduled task every minute

2018-02-15 Thread ktesr123456
Thanks Jordan, We are still evaluating on moving to 2.5. Do we have any workaround in 2.0 Thanks. On Thursday, February 15, 2018 at 1:13:27 AM UTC-5, Jordan Borean wrote: > > In the latest release it isn't possible to do with the current > win_scheduled_task module. For 2.5 the module was

Re: [ansible-project] Are there issue with mass deployment related to SSH?

2018-02-15 Thread Andrew Latham
Correct, Ansible is not the limit. Saltstack has guidelines around the same bottle necks for its ssh only solution. On Thu, Feb 15, 2018 at 5:15 AM, Manuel Schmidt wrote: > Hey, > > combined with the aforementioned forks configuration it all depends on > your

Re: [ansible-project] Gathering facts when the target does not have Python or internet access?

2018-02-15 Thread Brian Coca
Networking modules like that one mostly execute on the 'controller' and use their own connection to the remote appliance to send lists of commands. Their 'connecitons' are handled in a special manner and not how Ansible normally uses connection plugins. -- -- Brian Coca -- You received

Re: [ansible-project] Gathering facts when the target does not have Python or internet access?

2018-02-15 Thread Matt Hickok
Ok. So out of curiosity, how do modules like ios_facts work? Are they just wrappers around raw commands and script actions? On Thursday, February 15, 2018 at 9:06:39 AM UTC-6, Brian Coca wrote: > > Ansible is limited to raw and script actions when the target does not > have python. But using

Re: [ansible-project] Gathering facts when the target does not have Python or internet access?

2018-02-15 Thread Brian Coca
Ansible is limited to raw and script actions when the target does not have python. But using either of those can get you any info you need as long as you don't require privilege escalation. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] How to pass command line arguments when installing a rpm file

2018-02-15 Thread Brian Coca
shell is batch only, you want http://docs.ansible.com/ansible/latest/expect_module.html -- -- 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

[ansible-project] Gathering facts when the target does not have Python or internet access?

2018-02-15 Thread Matt Hickok
I'm looking to use Ansible as a way of gathering information about nodes on a network -- things like CPU architecture, kernel, basic things that would be captured by the setup module. While all of these devices will be running some flavor of Linux, none of them will be internet connected and

Re: [ansible-project] Re: Extracting a substring with regex_replace fails

2018-02-15 Thread 'Felix Fontein' via Ansible Project
Hi, > I have no XML skills. I nevertheless took a look at the ansible xml > module, and it's obscure to me. > I think you're right though: it'd be better to read XML appropriately > with that module rather than use some regex filter which can be > easily defeated if the input changes in the

[ansible-project] Re: Extracting a substring with regex_replace fails

2018-02-15 Thread jean-christophe manciot
@Kai Stian Olstad Thanks for your answer: yes, it works. @Felix Fontain I have no XML skills. I nevertheless took a look at the ansible xml module, and it's obscure to me. I think you're right though: it'd be better to read XML appropriately with that module rather than use some regex filter

Re: [ansible-project] Run pre/post tasks once with serial 1

2018-02-15 Thread Michael Perzel
Thanks. when: inventory_hostname == ansible_play_hosts[0] Is exactly what I need. -- 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] How to pass command line arguments when installing a rpm file

2018-02-15 Thread sureshmadapathii
hi All, I am installing a rpm file using ansible playbook , while installing I need to pass few arguments as below > yes/no > hostname >database name > primary db >password can some one suggest me my playbook file is as below --- - hosts: all become: yes tasks: - name: create

[ansible-project] Re: How does Ansible works when ansbile user can't get enter-pssession

2018-02-15 Thread Павел Полушин
Another one question. How can I connect to WinRM manually to debug some situation? -- 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 does Ansible works when ansbile user can't get enter-pssession

2018-02-15 Thread Павел Полушин
Jordan,thank you for the gread article and explanation. I still have a couple of questions. When Ansible connects to WinRM, what endpoint it uses? WinRM itself or some other endpoint that works using WinRM? And mayby you know, what benefits gives Read permission of WinRM? Now i give only Invoke

[ansible-project] Re: doubt

2018-02-15 Thread Manuel Schmidt
Hey you are nit indented your yaml file correctly. The docer_image command must be inside the task you have started with "- name". That means at least as much space until th n of name. For your further reference: http://docs.ansible.com/ansible/latest/YAMLSyntax.html Regards Am

Re: [ansible-project] Are there issue with mass deployment related to SSH?

2018-02-15 Thread Manuel Schmidt
Hey, combined with the aforementioned forks configuration it all depends on your Controll-Hosts capability to handle that many connections at the same time. I dont think that ansible would be the bottleneck here but the saturation of your network. Regards Am Donnerstag, 15. Februar 2018

[ansible-project] How does Ansible works when ansbile user can't get enter-pssession

2018-02-15 Thread Jordan Borean
Enter-PSSession using the PSRP protocol which is based on the WinRM protocol but not the same endpoint as to what Ansible users. If you configure the rootSDDL that will set the permissions for the WinRM endpoint used by Ansible but not the PSRP one. The PSRP endpoint uses the Remote Management

Re: [ansible-project] Are there issue with mass deployment related to SSH?

2018-02-15 Thread cmonty14
This means there's no drawback with regards to performance when using Ansible in a landscape with +1000 servers? Am Mittwoch, 14. Februar 2018 19:36:22 UTC+1 schrieb Andrew Latham: > > I suggest you start with reading about >

[ansible-project] Questions about file copy / modification

2018-02-15 Thread Sacha Lrt
Hello everybody ! I'm kind of new around here and a fresh new Ansible user ! So my questions may sounds little bit stupid... Anyway ! My environment is the following : I'm using ansible to manage VM behind a bastion. So I have a ssh.cfg file with ProxyCommand in it etc. Everything is working

[ansible-project] How does Ansible works when ansbile user can't get enter-pssession

2018-02-15 Thread Павел Полушин
Hi there. I have odd question, but i need to ask it. I set up Ansible to use windows account with limitied rights. All I do for this account is to write it's sid into rootsddl for Wirm. This user can't logon via RDP and make Enter-PsSession, but ansible still works? How? I thought that

[ansible-project] doubt

2018-02-15 Thread Dark Night
let me out from this below how can i integrate ansible with docker-container the function of docker commands run on ansible module for example docker pull command run ansible - name: pull an image docker_image: name: centos-7 its not working can anyone help me its

[ansible-project] Re: WinRM configuration script error

2018-02-15 Thread Snehit
Hi Rene , Have you able to resolve this issue ? I am also have same problem. << Unable to establish an HTTP or HTTPS remoting session. At C:\Users\snehit.rahate\Desktop\ConfigureRemotingForAnsible.ps1:404 char:5 + Throw "Unable to establish an HTTP or HTTPS remoting session." +