Re: [ansible-project] Ssh connectivity issues with ad-hoc commands, playbooks.yml, Ansible.

2023-06-14 Thread Prady A
You are running the script from root user. So it is trying to connect root@ip not administrator@ip On Thu, Jun 15, 2023 at 0:58, gonzalo diaz larenas < gonzalodiazlare...@gmail.com> wrote: > Dear > Good afternoon, sorry for the inconvenience, I'm just getting started with > what Ansible is,

Re: [ansible-project] Loop files that will be used as variables

2023-06-14 Thread Will McDonald
I think this answer might give you a pointer in the right direction: https://stackoverflow.com/a/52237675 It should work, but there could be a better/simpler way to do this. Do you control the generation of the files that provide your source variables? What's the *actual *problem you need to

Re: [ansible-project] Tags as variable inside of playbook

2023-06-14 Thread Brian Coca
Use the never tag: tags: never, mytag This ensures the task is never selected UNLESS you specifically target a defined tag. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] Tags as variable inside of playbook

2023-06-14 Thread Brian Lamb
A Magic var has been added, you can use ansible_run_tags now. https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst#minor-changes-4 On Wednesday, June 14, 2023 at 10:54:35 AM UTC-7 Brian Lamb wrote: > This looked promising, except that cli is not available on my

Re: [ansible-project] Tags as variable inside of playbook

2023-06-14 Thread Brian Lamb
This looked promising, except that cli is not available on my ansible v 2.14.2 using python 3.11.2 `Error was a , original message: cannot import name ''cli'' from ''__main__'' (/usr/bin/ansible-playbook)'` On Tuesday, March 15, 2016 at 12:40:13 PM UTC-7 Mike Biancaniello wrote: > It sounds

[ansible-project] Ssh connectivity issues with ad-hoc commands, playbooks.yml, Ansible.

2023-06-14 Thread gonzalo diaz larenas
Dear Good afternoon, sorry for the inconvenience, I'm just getting started with what Ansible is, specifically learning how to optimize daily tasks in laboratories. I set up a virtualized network with a central ansible server, from where I apply ad-hoc commands and automated playbooks.yml files

Re: [ansible-project] Calling the inventory created by first task to the second one

2023-06-14 Thread Veera
Thanks a lot . I am able to overcome it . I was missing the indent after the add_host earlier for the second task and now I can . On Wednesday, June 14, 2023 at 6:18:25 PM UTC+5:30 Dick Visser wrote: > > https://docs.ansible.com/ansible/latest/collections/ansible/builtin/add_host_module.html

[ansible-project] firewalld not found

2023-06-14 Thread Prady A
This is regarding firewalld collection I installed Rhel-system-roles now I copied firewalld.yml to my local collection(./collections) folder and when I am executing ansible-doc firewalld it cannot be found. Though if I am executing being inside the folder no issue. I want to use this firewalld

Re: [ansible-project] Install wazuh agent deb file for linux target hosts

2023-06-14 Thread khawaja Ali
correction --- - name: Install Wazuh agent hosts: become: yes tasks: - name: Add Wazuh repository key apt_key: url: https://packages.wazuh.com/key/GPG-KEY-WAZUH state: present - name: Add Wazuh repository apt_repository: repo: "deb

Re: [ansible-project] Install wazuh agent deb file for linux target hosts

2023-06-14 Thread khawaja Ali
I have not tested it, check it yourself. Ali --- - name: Install Wazuh agent hosts: become: yes tasks: - name: Add Wazuh repository key apt_key: url: https://packages.wazuh.com/key/GPG-KEY-WAZUH state: present - name: Add Wazuh repository

Re: [ansible-project] Calling the inventory created by first task to the second one

2023-06-14 Thread Dick Visser
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/add_host_module.html On Wed, 14 Jun 2023 at 14:33, Veera wrote: > Hi, > > I have a playbook book with 2 tasks in it . > In the first tasks, I have playbooks to create a VM and build OS on it > and able to login to the VM

[ansible-project] Calling the inventory created by first task to the second one

2023-06-14 Thread Veera
Hi, I have a playbook book with 2 tasks in it . In the first tasks, I have playbooks to create a VM and build OS on it and able to login to the VM manually (for testing) , and the final play creates a temporary inventory file like below. [dev-vm1] mytestvm1

Re: [ansible-project] Install wazuh agent deb file for linux target hosts

2023-06-14 Thread Dick Visser
On Wed, 14 Jun 2023 at 12:35, malek sakir <2141.maleksa...@gmail.com> wrote: > any one help me to write playbook for wazuh agent(.deb file) installation > in linux target hosts. > > https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html#playbook-syntax

[ansible-project] Loop files that will be used as variables

2023-06-14 Thread dudu.c...@gmail.com
Hi , I’m using the template module that takes a J2 template and update the relevant fields. My problem is When I want to create a file per file input should be used as variable – I’m actually need to understand how to loop file that should be used as var files *My J2 file* select *

[ansible-project] Install wazuh agent deb file for linux target hosts

2023-06-14 Thread malek sakir
any one help me to write playbook for wazuh agent(.deb file) installation in linux target hosts. -- 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