[ansible-project] Re: Help using Win_Copy Module From Windows Host To Windows Host

2020-09-14 Thread jbor...@gmail.com
No it will work, by default it's meant to copy files from the Ansible controller to the Windows host but with 'remote_src: yes' it changes the context of src to be from the remote Windows host. On Tuesday, September 15, 2020 at 6:44:49 AM UTC+10 pbul...@gmail.com wrote: > I will take a look at

[ansible-project] New release: ansible-base 2.10.1

2020-09-14 Thread Rick Elrod
Hi all- we're happy to announce that the general release of ansible-base 2.10.1 is now available! How to get it - $ pip install ansible-base==2.10.1 --user The tar.gz of the release can be found here: * ansible-base 2.10.1 https://pypi.python.org/packages/source/a/ansible-base/a

Re: [ansible-project] Re: How to make and run Ansible Playbooks in CentOS 7?

2020-09-14 Thread Antony Stone
On Monday 14 September 2020 at 18:45:56, Bruno loss Pegorari wrote: > We are reading the book "Asterisk: Definitive Guide 5th Edition", and to set > up an Asterisk environment, instead of doing everything manually, the book > offers a playbook which installs everything you need to start following

[ansible-project] Re: Help using Win_Copy Module From Windows Host To Windows Host

2020-09-14 Thread Paul Bull
I will take a look at this when i get home from work in the next few days and work this out. I presume i do have the right module and win_copy does allow Windows to windows copy then?. Only reason i ask is because of this in the documentation " The win_copy module copies a file on the local bo

Re: [ansible-project] I have some set Of dyntrace automation

2020-09-14 Thread Antony Stone
On Monday 14 September 2020 at 12:42:10, prakash malakar wrote: > Hi teams, > > Let me introduce myself; I am Malakar from India and having exp in > production support, but I want to change my profile into ansible. Welcome to the world of Ansible. > Can anyone help me to write the Playbook and

[ansible-project] Re: Help using Win_Copy Module From Windows Host To Windows Host

2020-09-14 Thread jbor...@gmail.com
You've set the become vars but you haven't actually turned on become, have a read through https://docs.ansible.com/ansible/latest/user_guide/become.html#become-flags-for-windows especially the "copy a file from a fileshare with custom credentials" example. If you are trying to copy a file fro

Re: [ansible-project] task to assign result of a lookup to a registered variable

2020-09-14 Thread Seb Collins
Thank you. That's done the job. Exactly what I was after. On Mon, 14 Sep 2020, 16:59 Dick Visser, wrote: > https://docs.ansible.com/ansible/latest/modules/set_fact_module.html > > On Mon, 14 Sep 2020 at 16:31, Jonin wrote: > > > > Hi, > > > > Is there a way to assign the value of a lookup (in t

Re: [ansible-project] Error running AWX template, new to this

2020-09-14 Thread Dick Visser
this is the ansible list - you probably want to use https://groups.google.com/g/awx-project On Mon, 14 Sep 2020 at 19:34, Richard Wolford wrote: > > Here is the error in it's entirety from the JOBS page, I've no idea what's > wrong: > > When I try to run a template, I get this error: PLAYBOOK:

Re: [ansible-project] Re: How to make and run Ansible Playbooks in CentOS 7?

2020-09-14 Thread Dick Visser
On Mon, 14 Sep 2020 at 18:46, Bruno loss Pegorari wrote: > > Hello everyone! > > Found this discussion in google after facing the same issue as the topic > creator. > > The point here is that he's not trying to learn everything at the same time. > We are reading the book "Asterisk: Definitive Gu

[ansible-project] Error running AWX template, new to this

2020-09-14 Thread Richard Wolford
Here is the error in it's entirety from the JOBS page, I've no idea what's wrong: When I try to run a template, I get this error: PLAYBOOK: Missing a revision to run due to failed project update. Here is the error from the JOBS page DETAILS STATUS Error STARTED 9/14/2020 1:10:44 PM FINISHED

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Tej Singh Rana
Please let us know what is the actual cause. On Mon, Sep 14, 2020 at 10:55 PM Eoghan O'Hara wrote: > Hi Raju, > > I tried that as well. > > I am now investigating my ssh configuration. > > Thank you all for the help! > > Eoghan > Eoghan O'Hara | Data Scientist | *Kx* | +353 858398926 | eoh...@kx

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Hi Raju, I tried that as well. I am now investigating my ssh configuration. Thank you all for the help! Eoghan Eoghan O'Hara | Data Scientist | *Kx* | +353 858398926 | eoh...@kx.com | Pronounced "own" On Mon, 14 Sep 2020 at 13:46, Raju Das wrote: > Hi Eoghan, > > Y

Re: [ansible-project] Re: How to make and run Ansible Playbooks in CentOS 7?

2020-09-14 Thread Bruno loss Pegorari
Hello everyone! Found this discussion in google after facing the same issue as the topic creator. The point here is that he's not trying to learn everything at the same time. We are reading the book "Asterisk: Definitive Guide 5th Edition", and to set up an Asterisk environment, instead of do

Re: [ansible-project] Template for /etc/hosts file replication

2020-09-14 Thread Dick Visser
It looks like you want to make sure a number of hosts can consistently resolve each other's names. But I don't understand the problem you have. The file can just be the same (hence it's consistent)? Either way, what is your source of truth? Start from there, for instance with a template. On Mon,

Re: [ansible-project] task to assign result of a lookup to a registered variable

2020-09-14 Thread Dick Visser
https://docs.ansible.com/ansible/latest/modules/set_fact_module.html On Mon, 14 Sep 2020 at 16:31, Jonin wrote: > > Hi, > > Is there a way to assign the value of a lookup (in this case a password) to a > variable and register it so that the registered variable can then be used in > different ta

[ansible-project] Template for /etc/hosts file replication

2020-09-14 Thread vi1...@gmail.com
Hi, Id like to ask for help to solve the following case, as I don't know how to solve it myself. Imagine that you have to *replicate "/etc/hosts" file* of the control node and spread it to specific managed nodes, *via J2 template*. "/etc/hosts" example: 127.0.0.1 local

[ansible-project] task to assign result of a lookup to a registered variable

2020-09-14 Thread Jonin
Hi, Is there a way to assign the value of a lookup (in this case a password) to a variable and register it so that the registered variable can then be used in different tasks of play without having to call the lookup itself multiple times? The closest I have got is using the debug module where

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Raju Das
Hi Eoghan, You can also check if it is plugin issue. As it is showing "Parsed /home/eohara/ansible/hosts inventory source with ini plugin" Adding to ansible.cfg. *[inventory] enable_plugins = host_list, script, auto, yaml, ini, toml* On Mon, Sep 14, 2020 at 5:55 PM Eoghan O'Hara wrote: > eoh

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Raju Das
See i think you have ssh config problem. either you have to do passwordless or using private keyfile(update inventory) [server] Pub_Private_IP ansible_user=username ansible_ssh_private_key_file=key.pem With Regards Raju Das On Mon, Sep 14, 2020 at 5:31 PM Raju Das wrote: > use this > > ansible

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
eohara@LPTP630 ~/ansible $ ansible -vvv -i hosts --private-key=/home/eohara/.ssh/keypairfile.pem -u ubuntu -m ping Usage: ansible [options] Define and run a single task 'playbook' against a set of hosts Options: -a MODULE_ARGS, --args=MODULE_ARGS module arguments --a

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Raju Das
use this ansible -i hosts --private-key=/home/eohara/.ssh/keypairfile.pem -u ubuntu -m ping On Mon, Sep 14, 2020 at 5:21 PM Eoghan O'Hara wrote: > Hi Dick, > > Thanks, I'll look through this again > Eoghan O'Hara | Data Scientist | *Kx* | +353 858398926 | eoh...@kx.com | > Pronounced "own" > <

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Hi Raju, eohara@LPTP630 ~/ansible $ ansible -vvv -i hosts exampleUBUNTU --private-key ~/.ssh/keypairfile.pem -u ubuntu -m ping ansible 2.8.4 config file = /home/eohara/ansible/ansible.cfg configured module search path = ['/home/eohara/.ansible/plugins/modules', '/usr/share/ansible/plugins/modu

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Hi Dick, Thanks, I'll look through this again Eoghan O'Hara | Data Scientist | *Kx* | +353 858398926 | eoh...@kx.com | Pronounced "own" On Mon, 14 Sep 2020 at 12:34, Dick Visser wrote: > As stated on > https://docs.ansible.com/ansible/latest/modules/ping_module.html,

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Raju Das
Hi , ansible -i hosts --private-key=urspemfile.pem -u username -m ping Please check With Regards Raju Das On Mon, Sep 14, 2020 at 5:06 PM Eoghan O'Hara wrote: > Hi Tej, > > No special purpose. I changed to IP now, no change > > On Monday, September 14, 2020 at 11:52:14 AM UTC+1 iamtejs...@gma

[ansible-project] Ansible Devstack Integration

2020-09-14 Thread Yantram Cloud
I am currently working on an devstack integration with ansible, The authentication seems to be an issue. i get this error. generic/base.py\", line 208, in get_auth_ref\nreturn self._plugin.get_auth_ref(session, **kwargs)\n File \"/home/rashmi/anaconda3/lib/python3.7/site-packages/keyston

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Hi Tej, No special purpose. I changed to IP now, no change On Monday, September 14, 2020 at 11:52:14 AM UTC+1 iamtejs...@gmail.com wrote: > Any special purpose to define this > ec2-18-132-46-235.eu-west-2.compute.amazonaws.com instead of IP of the > ec2 instance ? > > On Mon, Sep 14, 2020 at

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Dick Visser
As stated on https://docs.ansible.com/ansible/latest/modules/ping_module.html, it is NOT ICMP ping, this is just a trivial test module that requires Python on the remote-node. If ansible ping fails, this means that your SSH config/setup is wrong. This needs to be fixed before you can do anything. I

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Tej Singh Rana
Any special purpose to define this ec2-18-132-46-235.eu-west-2.compute.amazonaws.com instead of IP of the ec2 instance ? On Mon, Sep 14, 2020 at 4:03 PM Eoghan O'Hara wrote: > Unfortunately, *ansible all -m ping -i hosts* still gives the same > result > > On Monday, September 14, 2020 at 11:21

[ansible-project] I have some set Of dyntrace automation

2020-09-14 Thread prakash malakar
Hi teams, Let me introduce my self i am Malakar from India.Iand having exp in production support,but i want to change my profile into ansible .Can anyone help me to to write the Playbook and json payload and jinja template . 1.Ansible playbook to adding the credential in Dynatrace Vault (Js

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Unfortunately, *ansible all -m ping -i hosts* still gives the same result On Monday, September 14, 2020 at 11:21:49 AM UTC+1 iamtejs...@gmail.com wrote: > Try with > *ansible all -m ping -i hosts* > It will work. > > On Mon, Sep 14, 2020 at 3:45 PM Raju Das wrote: > >> *Hi Eoghan,* >> >> *A

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Hi, It does not work with -i hosts eohara@LPTP630 ~/ansible $ ansible all --list-hosts hosts (1): ec2-18-132-46-235.eu-west-2.compute.amazonaws.com eohara@LPTP630 ~/ansible $ eohara@LPTP630 ~/ansible $ ls -lart total 25 -rw-r--r-- 1 eohara FD+Group(513)50 Sep 14 10:46 hosts -rw-r--r-

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Tried this, no change On Monday, September 14, 2020 at 11:15:09 AM UTC+1 iamtejs...@gmail.com wrote: > Try to define under the absolute path > inventory = /home/eohara/ansible/hosts > > On Fri, Sep 11, 2020 at 10:30 PM Eoghan O'Hara wrote: > >> The file specified in -i is hosts in the current

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
I can ping the current ec2 instance and another one without ansible. The output of that command is below eohara@LPTP630 ~/ansible $ ansible -vvv localhost -m ping ansible 2.8.4 config file = /home/eohara/ansible/ansible.cfg configured module search path = ['/home/eohara/.ansible/plugins/modul

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Tej Singh Rana
Try with *ansible all -m ping -i hosts* It will work. On Mon, Sep 14, 2020 at 3:45 PM Raju Das wrote: > *Hi Eoghan,* > > *Are you able to run it explicitly using ( -i hosts)? And are u able to > check --list-host? permission of the hosts file? password less auth has > been configured?* > > *WIth

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Raju Das
*Hi Eoghan,* *Are you able to run it explicitly using ( -i hosts)? And are u able to check --list-host? permission of the hosts file? password less auth has been configured?* *WIth Regards* *Raju Das* On Mon, Sep 14, 2020 at 3:19 PM Eoghan O'Hara wrote: > Hi Tej, > > I have tried that on my

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Tej Singh Rana
Try to define under the absolute path inventory = /home/eohara/ansible/hosts On Fri, Sep 11, 2020 at 10:30 PM Eoghan O'Hara wrote: > The file specified in -i is hosts in the current working directory > > See below > > $ head -15 ansible.cfg > # config file for ansible -- https://ansible.com/ > #

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Tej Singh Rana
Are you able to ping other ec2 instances without ansible? What is the output of the below command: *ansible localhost -m ping* On Mon, Sep 14, 2020 at 3:19 PM Eoghan O'Hara wrote: > Hi Tej, > > I have tried that on my inbound rules, to no avail. > > As a test, I set inbound and outbound rule

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Hi Tej, I have tried that on my inbound rules, to no avail. As a test, I set inbound and outbound rules in my security group to accept all traffic on all protocols. Still, I am seeing the same output On Monday, September 14, 2020 at 10:02:11 AM UTC+1 iamtejs...@gmail.com wrote: > You need to

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Tej Singh Rana
You need to add the ICMP option in the security groups. On Mon, Sep 14, 2020 at 2:28 PM Eoghan O'Hara wrote: > Any other suggestions would be greatly appreciated > On Friday, September 11, 2020 at 5:59:56 PM UTC+1 Eoghan O'Hara wrote: > >> The file specified in -i is hosts in the current working

Re: [ansible-project] Re: Ansible ping not giving an output

2020-09-14 Thread Eoghan O'Hara
Any other suggestions would be greatly appreciated On Friday, September 11, 2020 at 5:59:56 PM UTC+1 Eoghan O'Hara wrote: > The file specified in -i is hosts in the current working directory > > See below > > $ head -15 ansible.cfg > # config file for ansible -- https://ansible.com/ > # ==

[ansible-project] Conditional copy based on the existence of a directory

2020-09-14 Thread Victor Sudakov
Dear Colleagues, I'd like to be able to copy/template a file to a directory on a remote host depending upon the existence of the directory there (from a list of possible variants). Below I publish what I currently use but I hope there is a more scalable and elegant method, can you advise one?