[ansible-project] Re: problem copy/template module with edgerouter

2019-08-07 Thread Ganesh Nalawade
You can try with net_put module https://docs.ansible.com/ansible/latest/modules/net_put_module.html On Wednesday, 7 August 2019 09:17:28 UTC+5:30, Chang Eric wrote: > > I want to configure some of edgerouters with ansible > one of the tasks is send a user`s public key then config authenticate

Re: [ansible-project] playbook without hosts desribed

2019-08-07 Thread Veera
Hi kai, Thanks for the inputs. "for security reasons". - I mean that we have disabled gather_facts for better performance. And we want other users to play the playbook with access to the same inventory . I am looking for a way to avoid them running "ansible-playbook pb.yml -e

Re: [ansible-project] Folder Permission for Multiple directories at once

2019-08-07 Thread Sandip Bhattacharya
 Please always share your actual error message to help people helping you. On August 7, 2019 at 6:23:31 PM, Bishwajit Samanta (bishwajitsamanta1...@gmail.com(mailto:bishwajitsamanta1...@gmail.com)) wrote: > Hi All, > > I am trying to achieve mentioning multiple directories in var.yml so

[ansible-project] Folder Permission for Multiple directories at once

2019-08-07 Thread Bishwajit Samanta
Hi All, I am trying to achieve mentioning multiple directories in var.yml so that in loop i can give them folder permission however it is not working. Can anyone help me here. --- - name: "File List" hosts: localhost gather_facts: no become: yes become_user: root tasks: - include_vars:

Re: [ansible-project] Ansible - Responding to prompts

2019-08-07 Thread Michael Okonji
>From my research it appears the expect module would work perfectly for hard-coded responses to questions that I already have knowledge of... as Ansible is basically an automated replay of an otherwise manual process including recorded prompts and responses. Outside of such scenarios where i

Re: [ansible-project] Typo in hard link example for file module?

2019-08-07 Thread Sandip Bhattacharya
On August 7, 2019 at 4:10:31 PM, Andrew Latham (lath...@gmail.com(mailto:lath...@gmail.com)) wrote: > It appears to be correct in code, maybe a recent fix that just has not > resulted in a refreshed docs page. See >

[ansible-project] Force ansible remote directory to /tmp

2019-08-07 Thread Rich Rauenzahn
My ansible runs really slowly, I've looked at various things, and one thing I haven't eliminated yet is that ansible runs in my NFS directory as it ssh'es around. I've run ansible before and its performance is fine usually -- but the biggest difference in this setup is slow NFS and extra

Re: [ansible-project] Typo in hard link example for file module?

2019-08-07 Thread Andrew Latham
Sandip It appears to be correct in code, maybe a recent fix that just has not resulted in a refreshed docs page. See https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/files/file.py#L147 On Wed, Aug 7, 2019 at 4:12 PM Sandip Bhattacharya < sand...@showmethesource.org> wrote: > >

[ansible-project] Typo in hard link example for file module?

2019-08-07 Thread Sandip Bhattacharya
  [my third attempt to send this message got lost somehow. Trying again.] In the documentation for the file module at: https://docs.ansible.com/ansible/latest/modules/file_module.html An example for creating hard links is given as below:   - name: Create two hard links     file:      

Re: [ansible-project] How can I return a list from a dict based on a sub items value?

2019-08-07 Thread David Reagan
Thanks! That got me to where I wanted. - David On Wednesday, August 7, 2019 at 11:58:26 AM UTC-7, Kai Stian Olstad wrote: > > On 07.08.2019 20:07, David Reagan wrote: > > How can I return a list from a dict based on a sub items value? > > > > If I have a dictionary like this: > > > >

[ansible-project] Re: Changing Registry key owner in Ansible

2019-08-07 Thread Jordan Borean
The win_acl module just adds an ACE to the DACL of an object and doesn't adjust the owner. Technically the win_owner module can do that but that's only designed for files/directories and not registry keys. As for your become_user: TrustedInstaller task, we currently can't runas that user as

[ansible-project] Re: win_dsc UrlAcl and passing int[]

2019-08-07 Thread Jordan Borean
You should be using a YAML list or a Python list like the below; Port: - 46000 - 46100 # or Port: [46000, 46100] 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

Re: [ansible-project] How can I return a list from a dict based on a sub items value?

2019-08-07 Thread Kai Stian Olstad
On 07.08.2019 20:07, David Reagan wrote: > How can I return a list from a dict based on a sub items value? > > If I have a dictionary like this: > > ospackages: >>fail2ban: >> state: "present" >> Ubuntu: >>1604: "fail2ban" >>1804: "fail2ban" >> Debian: >>

[ansible-project] Re: How can I return a list from a dict based on a sub items value?

2019-08-07 Thread David Reagan
I should note that I have not yet tried using a task to filter through the dictionary, and register the result to a variable or maybe use set_fact in some manner. I'd prefer not to get that complicated in the playbooks. Hence why I think a lookup plugin would be handy. Plus, I really really

Re: [ansible-project] delegate_to /one member/ of a group

2019-08-07 Thread rashmi nair
Hi All, I have a task which has multiple with_items and hence it picks the latest defined item (arbiter) in the delegate which is not the expected result: ``` run_once: true delegate_to: "{{ item }}" with_items: - "{{ groups['mongodb-active'] }}" shell: /usr/bin/mongo --eval

[ansible-project] How can I return a list from a dict based on a sub items value?

2019-08-07 Thread David Reagan
How can I return a list from a dict based on a sub items value? If I have a dictionary like this: ospackages: > fail2ban: > state: "present" > Ubuntu: > 1604: "fail2ban" > 1804: "fail2ban" > Debian: > 9: "fail2ban" > CentOS: > 7: "fail2ban" >

Re: [ansible-project] problem copy/template module with edgerouter

2019-08-07 Thread Kai Stian Olstad
On 07.08.2019 05:47, Chang Eric wrote: > I want to configure some of edgerouters with ansible > one of the tasks is send a user`s public key then config authenticate with > that key > the task is quite simple > but I found although the tasks runs successfully , but the file does not > show on

Re: [ansible-project] Ansible - Responding to prompts

2019-08-07 Thread Kai Stian Olstad
On 07.08.2019 19:51, Michael Okonji wrote: > Does anyone know how to read back a prompt to a control server from a > remote host? say if an installation fails and prompts for a retry or > continue, this prompt can be responded to from the control server. Is this > possible? Only way to deal with

[ansible-project] Ansible - Responding to prompts

2019-08-07 Thread Michael Okonji
Does anyone know how to read back a prompt to a control server from a remote host? say if an installation fails and prompts for a retry or continue, this prompt can be responded to from the control server. Is this possible? -- You received this message because you are subscribed to the Google

Re: [ansible-project] Exposing variables from connection plugin

2019-08-07 Thread Juan Asensio Sánchez
Thanks Brian, could you share those hacks? Would it be enough to set an environment variable (at least for delegate_to localhost tasks)? El mié., 7 ago. 2019 a las 16:41, Brian Coca () escribió: > Currently, there is no set way for connection plugins to return > variables, I have been thinking

Re: [ansible-project] playbooks with no gatherfacts and using fqdn

2019-08-07 Thread Kai Stian Olstad
On 07.08.2019 19:12, Veera wrote: > Is there a way I can use the hostname or the IP which the ansible play > uses for execution . {{ inventory_hostname }} or {{ ansible_host }} depending on how your inventory. -- Kai Stian Olstad -- You received this message because you are subscribed to

Re: [ansible-project] playbook without hosts desribed

2019-08-07 Thread Kai Stian Olstad
On 07.08.2019 18:55, Veera wrote: > Hi, > > Is there a way that we can use a playbook with no "hosts: XXX" defined. No, hosts is a required attribute for a play. > All the servers are available in the inventory file defined in the > ansible.cfg , but the playbooks have to be run based on

[ansible-project] playbooks with no gatherfacts and using fqdn

2019-08-07 Thread Veera
Hi , I am trying to create a logfile with the hostname and date . But due to some Infra limitations I have to disable the gather facts. - name: collect report ignore_errors: yes shell: grep "`date '+%b.%d'`" /var/log/yum.log > /home/devops/ patchreport_$(date +%F)

[ansible-project] Re: Server application Widlfly in Ansible

2019-08-07 Thread Karther
Hey !! Up Please can you help me please !!! ;) Regards, Karther Le mardi 6 août 2019 10:29:02 UTC+2, Karther a écrit : > > Hey, > > I have on problem, i deploy application on server wildfly. > > I want to know if possible to find link url of my application who is > deploy on this server. > >

Re: [ansible-project] dynamic inventory

2019-08-07 Thread Brian Coca
on the config side your indentation seems wrong (but that might just be an email issue), your main problem though is that you need the vmware sdk installed on the same python that ansible is using to execute. -- -- Brian Coca -- You received this message because you are subscribed to

[ansible-project] Re: ecs_taskdefinition module not creating new revision

2019-08-07 Thread Saurabh Agrawal
does anyone have a solution for this issue? I could not able to register a new version of the task definition. On Thursday, June 30, 2016 at 10:08:14 PM UTC+5:30, Niko Ruotsalainen wrote: > > Hi, > > I'm trying to use ecs_taskdefinition module to create task definitions to > ECS. > > I'm using

Re: [ansible-project] Background process exits when pipeling is set to false

2019-08-07 Thread Brian Coca
pipelining kept the ssh connection open, normally tasks will open/execute/close the connection, which includes tty. Most 'services' should detach correctly, but many don't, this seems to be your case. #1 i would make these into actual services and use your service manager to handle them #2 if

Re: [ansible-project] Exposing variables from connection plugin

2019-08-07 Thread Brian Coca
Currently, there is no set way for connection plugins to return variables, I have been thinking this would be a needed feature. There are probably a few hacky ways of doing it, but i dont recommend that approach as those are not guaranteed to continue working. -- -- Brian Coca -- You

[ansible-project] Re: How to escape doublequote and curly braces

2019-08-07 Thread Rakesh Parida
I was able to make it work: jetty_c: "'{\"components\":\"{{ my_updated_list}}\"}'" But now iam facing one more issue: i am trying to debug the contents to file but only the last item is getting appended - name: Create Jetty Components set_fact: jetty_c:

Re: [ansible-project] using variable from another file

2019-08-07 Thread Philippe Eveque
So Sebastian did provide the answer and help ;-) Hint: read the vars_files in the the provided links Phil Le mar. 6 août 2019 à 16:48, Noctis Geek a écrit : > thanks for this, but if i come here it's for get help, i already read the > doc > > -- > You received this message because you are

[ansible-project] Re: Changing Registry key owner in Ansible

2019-08-07 Thread Yuval Zaltz
For now managed with https://helgeklein.com/setacl - SetACL but I'm interested to know if there is a Ansible solution On Wednesday, August 7, 2019 at 12:11:58 PM UTC+3, Yuval Zaltz wrote: > > Is there a way in Ansible to change registry key ownership? win_acl > doesn't cover it > > I'm running

Re: [ansible-project] Error in ansible Python API

2019-08-07 Thread Kai Stian Olstad
On 07.08.2019 12:07, PranavBarve wrote: > I have encountered an error while working with ansible Python API. > > Error : "the connection plugin '' > was not found" > > I googled this error and found this answer : > https://github.com/ansible/ansible/issues/59390 > > I want to know is there any

[ansible-project] Error in ansible Python API

2019-08-07 Thread PranavBarve
I have encountered an error while working with ansible Python API. Error : "the connection plugin '' was not found" I googled this error and found this answer : https://github.com/ansible/ansible/issues/59390 I want to know is there any way I can resolve this error. I am using and Python

[ansible-project] Error in Ansible Python API

2019-08-07 Thread PranavBarve
I encountered an error while working with the ansible Python API. I google the error and found this : https://github.com/ansible/ansible/issues/59390 I want to know is there any way this error can be resolved. Error : *PLAY [Create the Ansible helper variables for the ambari-server]

[ansible-project] yum: Installroot to empty directory

2019-08-07 Thread Oleg Kotsar
Hello. I would like to install the base CentOS to a specify directory, example to /var/centos. The directory is empty. I usage the next command in yum: yum --disablerepo='*' --enablerepo='base,updates' --releasever=7 -- installroot=/var/centos groupinstall @core This command installs the base

[ansible-project] Changing Registry key owner in Ansible

2019-08-07 Thread Yuval Zaltz
Is there a way in Ansible to change registry key ownership? win_acl doesn't cover it I'm running this task - name: Change key owner to machine admins win_acl: path: HKCR:\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6} user: "{{ inventory_hostname_short }}\\Administrators" rights:

[ansible-project] win_dsc UrlAcl and passing int[]

2019-08-07 Thread 'Richard Payne' via Ansible Project
I'm trying to integrate my existing DSC configuration into my Ansible setup. I'm using the UrlAcl module ( https://www.powershellgallery.com/packages/HttpSys/1.0.1/Content/UrlAcls%5CUrlAcls.ps1) and its Port property is an int[]. This is what I'm trying: - name: UrlAcls - Http Wcf interface

Re: [ansible-project] Help for variable defination

2019-08-07 Thread Rahul Kumar
Thanks much sebastian . I will try it out. Rahul On Tue, 6 Aug 2019 at 17:21, Sebastian Meyer wrote: > Hi Rahul, > > On 01.08.19 14:24, Rahul Kumar wrote: > > HI Ansible Gurus, > > I have a specific snippet of code which i defined in default/main.yaml > of a > > role xyz. > > > >

Re: [ansible-project] How to escape doublequote and curly braces

2019-08-07 Thread Rakesh Parida
The value of my "my_joined_list" is : idp:25.0.1,das:25.0.0 Now i want my o/p to be as follows: '{"components":"idp:25.0.1,das:25.0.0"}' Error is as below ERROR! Syntax Error while loading YAML. found unknown escape character The error appears to be in