RE: [ansible-project] wrong task state with network_cli (failed/unreachable)

2020-09-16 Thread Richard Wolford, PhD
I believe you can’t use the loopback address as the destination.  Have you tried the private IP? Sent from Mail for Windows 10 From: Greg MonroeSent: Wednesday, September 16, 2020 6:10 AMTo: Ansible ProjectSubject: [ansible-project] wrong task state with network_cli (failed/unreachable) Hello! I'm

[ansible-project] Ansible 2.5.1 APC Battery Backup Playbook to Reboot Outlet Group

2020-09-16 Thread Calvin Kalabat
I've been trying my hand with a playbook that would connect to a APC UPS and reboot a specific outlet group. The command is very simple in order to get the outlet group to reboot but I'm having issues with submitting the command to the device. My SSH connection seems to go through fine but

Re: [ansible-project] Generate group_var file from Ansible playbook

2020-09-16 Thread Dick Visser
Try this single task instead (I used some slightly simpler logic for random generation): - name: dummy hosts: localhost gather_facts: no tasks: - name: Populate random values for each group copy: content: | {% for group in (groups.keys() | difference(['all',

[ansible-project] Generate group_var file from Ansible playbook

2020-09-16 Thread xinhua...@gmail.com
Hello, I need to use an Ansible playbook to dynamically generate Ansible group_var type file. Here is my inventory file: [group1] server1.example.com server2.example.com [group2] server3.example.com server4.example.com The generated mygroupvars file is expected to be: group1_var:

[ansible-project] Processing data from Node

2020-09-16 Thread Scott Fadden
What is the best approach using ansible to 1. Query data from a VM 2. Operate on the results I need to look up the sd device serial numbers on the VM then process that locally (on node running ansible) then run another playbook using the results to create LVM entities, file systems etc.I

Re: [ansible-project] Re: Copy module error in windows

2020-09-16 Thread rubod singh
thank you all it worked finally. i can start working on rest of the modules now. On Wed, Sep 16, 2020 at 12:02 PM Dick Visser wrote: > > In essence the remote_src parameter is a Boolean: > > https://docs.ansible.com/ansible/latest/modules/win_copy_module.html#parameter-remote_src > > > On

Re: [ansible-project] Re: Copy module error in windows

2020-09-16 Thread Dick Visser
In essence the remote_src parameter is a Boolean: https://docs.ansible.com/ansible/latest/modules/win_copy_module.html#parameter-remote_src On Wed, 16 Sep 2020 at 17:57, Raju Das wrote: > > - name: Copy a single file where the source is on the remote host > > win_copy: > > src:

Re: [ansible-project] Re: Copy module error in windows

2020-09-16 Thread Raju Das
- name: Copy a single file where the source is on the remote host win_copy: src: C:\Temp\foo.txt dest: C:\ansible\foo.txt *remote_src: yes <-use this *- name: Copy a folder recursively where the source is on the remote host win_copy:

Re: [ansible-project] Re: Copy module error in windows

2020-09-16 Thread rubod singh
actually source file is also on windows server ( which is also the target server) do we need to mention any remote_host ? On Wed, Sep 16, 2020 at 11:28 AM rubod singh wrote: > > Thanks Rahul - > > got this error now > > > { > "src": "C:\\abc.txt", > "dest": "C:\\ansible\\abc.txt", >

Re: [ansible-project] Re: Copy module error in windows

2020-09-16 Thread rubod singh
Thanks Rahul - got this error now { "src": "C:\\abc.txt", "dest": "C:\\ansible\\abc.txt", "msg": "Could not find or access 'C:\\abc.txt'\nSearched

[ansible-project] mysql_user does not find /root/.my.cnf

2020-09-16 Thread Ed Greenberg
My ansible 2.9.10-1.el7 connects to the target machines as root. On my target machines, I have /root/.my.cnf with a root password defined under the section [mysql]. Here is the playbook and response - hosts: databaseservers tasks: - name: add user to mysql mysql_user: name:

Re: [ansible-project] Dynamically set ansible_network_os inside playbook fails

2020-09-16 Thread Matt Miller
Hi Matt, Thanks for the response. I did as you suggested, and got different results, but it's still not working. It's now complaining about failure to authenticate, which I assume means it's now happy with the variable assignment, but it broke the authentication. Full disclosure, without

Re: [ansible-project] new ansible server build

2020-09-16 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
I was unable to do a successful RHEL 7 -> 8 upgrade. So I did a clean install on a separate system and moved all of my content over to that system. The RHEL8 system is the controller node. I am using the same ssh keys from the RHEL7 system. On Wed, Sep 16, 2020 at 3:18 AM Dick Visser wrote:

[ansible-project] problem using uri module with proxmox api

2020-09-16 Thread Martin Etcheverry
Hi , i am pretty noob with ansible, i am struggling interacting with proxmox api using the module uri. I know that exist a proxmox module in ansible , but i need to send keys right after the vm boots , and that is not covered with the proxmox module . The proxmox api has a node to send keys (yes

[ansible-project] Re: Copy module error in windows

2020-09-16 Thread Rahul Puli
Hello Rubod, Please try to run the below code and check. --- - name: "Copy Files" hosts: all tasks: - name: Copy Files win_copy: src: C:\abc.txt dest: C:\ansible\abc.txt On Wednesday, September 16, 2020 at 6:17:13 PM UTC+5:30 rubod...@gmail.com wrote: > HI Team, > > please help

[ansible-project] Copy module error in windows

2020-09-16 Thread rubod singh
HI Team, please help me in this as i'm very new to this , i'm getting this error while testing the simple windows file copy module through awx. Ansible VM is on Azure Target Windows machine is also on Azure - No network restrictions as this is a POC project playbook : --- - name: "Copy Files"

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

2020-09-16 Thread Vicente Domínguez
Hi, As mentioned in the first email of the thread: - /etc/hosts file example to be replicated: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.0.1.70 node1

[ansible-project] wrong task state with network_cli (failed/unreachable)

2020-09-16 Thread Greg Monroe
Hello! I'm evaluating ansible to configure network switches and observed that the task result is not correct if the switch is not reachable. Using network_cli it's always 'failed' where I'd expect 'unreachable". A minimal working example using localhost: host.yml: all: hosts: local:

Re: [ansible-project] Error when trying to run playbook to install vsftpd package

2020-09-16 Thread Dick Visser
With so little information and context, it is impossible to tell what is going on. Provide at least the playbook, the ansible version, and its configuration. On Wed, 16 Sep 2020 at 11:01, Gebrina Divva Meuthia Zulma < gebgeb...@gmail.com> wrote: > > Hello so I have a problem, I am trying to

Re: [ansible-project] Multiple Ansible YAML File Into SIngle

2020-09-16 Thread Dick Visser
yq m ... On Wed, 16 Sep 2020 at 09:47, surabhy vaishakh wrote: > > How to merge multiple YAML file into a single one? > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails

Re: [ansible-project] How to add python path to environment variable using ansible

2020-09-16 Thread Dick Visser
On Wed, 16 Sep 2020 at 06:43, surabhy vaishakh wrote: > > Thanks for you help. > I have tried using this module. Looks like post installation required a > restart to work this. How can i avoid a restart. > server node: windows 2012 R That is a question specific to the application specific

Re: [ansible-project] new ansible server build

2020-09-16 Thread Dick Visser
Hii On Wed, 16 Sep 2020 at 04:27, 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: > > Hi all, so this may be simple but I can't seem to figure it out. :( > > I built a new RHEL8 server from my RHEL7 system and ran my playbooks as > normally would and now I'm getting these errors:

[ansible-project] Error when trying to run playbook to install vsftpd package

2020-09-16 Thread Gebrina Divva Meuthia Zulma
Hello so I have a problem, I am trying to install vsftpd in debian 9 with ansible, but I always get this error: ERROR! Invalid callback for stdout specified: yaml This is my playbook I have tried to run it with ansible-playbook -v debian163.yml and it still didnt work, anyone know why?

[ansible-project] Ansible-2.10.0 release candidate 1

2020-09-16 Thread Toshio Kuratomi
Hi all- For all those wanting to test the next version of Ansible, we're happy to announce that Ansible 2.10.0 release candidate 1 is now available on PyPI! Ansible 2.10.0rc1 pulls in the ansible-base-2.10.1 package via a dependency and includes a range of Ansible Collections. The Ansible 2.10

[ansible-project] Multiple Ansible YAML File Into SIngle

2020-09-16 Thread surabhy vaishakh
How to merge multiple YAML file into a single one? -- 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 view this