Re: [ansible-project] Ansible Create vSphere Virtual Machine

2020-02-17 Thread Jorge Rúa
Try with : folder: "{{ yourfolder | d ('/') }}" El lun., 17 feb. 2020 a las 15:48, David Foley () escribió: > Ansible playbook fails to deploy Virtual Machine: Can't Find Folder > How can I deploy a Virtual machine without any Folders within the Cluster > ? > > --- > - name: Running Create

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-18 Thread Jorge Rúa
That error message often indicates an indentation issue or a missing module parameter. On Sat, Apr 18, 2020, 20:22 Tony Wong wrote: > Hi > > why is it when i run this playbook I get this error > > tony@ubuntu:~/ansiblework$ ansible-playbook vmware_tools.yml > [WARNING]: provided hosts list is

Re: [ansible-project] Re: ansible add esxi host to datacenter or folder

2020-04-13 Thread Jorge Rúa
Best thing you can do to understand how vCenter is organized is using govc tool: For example, this is my home lab: ➜ govc about Name: VMware vCenter Server Vendor: VMware, Inc. Version: *6.7.0* Build:15129973 OS type: linux-x64 API type: VirtualCenter API

Re: [ansible-project] Re: ansible add esxi host to datacenter or folder

2020-04-13 Thread Jorge Rúa
Hi Tony, There are two ways of adding an esxi host to vCenter: - In standalone mode (not part of a vCenter cluster) - Part of a vCenter cluster See the following examples: In standalone mode, first you'll need a host folder to place your esxi hosts. Bear in mind here that

Re: [ansible-project] need assistance with this playbook

2020-04-14 Thread Jorge Rúa
Have a look here https://github.com/veksh/ansible-esxi El mar., 14 abr. 2020 a las 14:28, Tony Wong () escribió: > how do i create a ansible vmware playbook with following > > > - join esx host to domain > - setup ntp with - 0.pool.ntp.org, 1.pool.ntp.org > - set advance settings on host :

Re: [ansible-project] Yum Groupinstall Documentation vs Reality?

2020-04-29 Thread Jorge Rúa
ome-desktop-environment”. Use the “yum group list hidden > ids” command to see which category of group the group you want to install > falls into." > > This is why I stopped reading there... > > On Wed, Apr 29, 2020 at 2:44 PM Jorge Rúa wrote: > >> In the link yo

Re: [ansible-project] ERROR: Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips

2020-04-28 Thread Jorge Rúa
Haven't looked too much into it, but are you aware of limitations of running in a FIPS enabled mode? Can you provide us with a sample playbook (please remove access tokens, credentials, private keys, passwords, etc) Thanks El mar., 28 abr. 2020 a las 11:14, Parasuram A Havoji () escribió: >

Re: [ansible-project] Yum Groupinstall Documentation vs Reality?

2020-04-29 Thread Jorge Rúa
In the link you mentioned I can see: - name: install the 'Development tools' package group yum: name: "@Development tools" state: present El mié., 29 abr. 2020 a las 13:19, Davide Scrimieri () escribió: > Hello > > The documentation here >

Re: [ansible-project] has anyone setup private ansible galaxy?

2020-10-19 Thread Jorge Rúa
I think a doable solution would be installing a pulp3 server in your on-premise servers. https://pulpproject.org/content-plugins/#ansible HTH, Regards, El lun., 19 oct. 2020 a las 15:37, Prabha () escribió: > Hi, > > Has anyone ever setup a Private Ansible Galaxy server. I am hardly finding >

[ansible-project] PureStorage FlashArray Networking Module

2020-05-28 Thread Jorge Rúa
Hi all, I am trying to configure some fa devices, as part of that process of configuring them we need to set some network parameters for certain interfaces. I've seen there's a module for FlashBlades[1], but not for FlashArrays. Wondering if there's any better alternative to use the uri module

[ansible-project] Re: PureStorage FlashArray Networking Module

2020-05-28 Thread Jorge Rúa
Inc.* > +39 345 538 9912 <+393455389912> | eugenio.gro...@purestorage.com > > > On Thu, May 28, 2020 at 1:20 PM Jorge Rúa wrote: > >> Hi all, >> >> I am trying to configure some fa devices, as part of that process of >> configuring them we need to set

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-21 Thread Jorge Rúa
Can we assume you're running an ansible version compatible with collections? What's collection_path on your ansible.cfg ? Have you tried running it with -vvv? El mié., 21 oct. 2020 a las 22:10, Fiend Busa () escribió: > Hey, > > I get the same error: > ERROR! couldn't resolve module/action >

Re: [ansible-project] Erreur parameter in ios_command module

2020-06-09 Thread Jorge Rúa
Apparently ios_command module accepts commands (in plural) instead of command. Regards, El mar., 9 jun. 2020 a las 9:30, Redhat () escribió: > Hello; > > I wanted to update switch cisco by ansible. To copy the ios image from > SFTP server, the playbook deployment will display the following

Re: [ansible-project] Slowness problèmes after upgrade from 2.8 to 2.9

2020-10-21 Thread Jorge Rúa
I *suspect* that issue might be caused by the newer ansible version which is potentially exhausting resources on the ansible controller node. Pay close attention to memory usage on the controller node when you're running ansible. El mié., 21 oct. 2020 a las 13:31, Quentin Aveno () escribió: > Hi

Re: [ansible-project] Terraform Module - Output Returns Empty after Successful Run.

2021-01-14 Thread Jorge Rúa
What ansible documentation say is that the terraform ansible module ouputs Terraform outputs https://www.terraform.io/docs/configuration/outputs.html If you don't have any Terraform output declared in your .tf files you won't see any output. HTH El mié, 13 ene 2021 a las 21:38, Bharath

Re: [ansible-project] Still create LVM even hosts dont have enough space

2021-01-25 Thread Jorge Rúa
You can fetch secondary disk size and set the lvm size depending on it. This is what I would do in your case: - Set default lvm size to a safe value that you know all your hosts will meet. ie : 20G - Fetch secondary disk size. If it's 50G or higher overwrite default lvm size to 40G

Re: [ansible-project] Still create LVM even hosts dont have enough space

2021-01-25 Thread Jorge Rúa
- hosts: localhost become: True gather_facts: False vars: disk: loop0 vg_name: vgname lv_name: lvname default_lv_size: 400M tasks: - name: Collect hardware facts setup: gather_subset: - hardware - name: Register {{ disk }} size set_fact: secondary_disk_size: "{{

Re: [ansible-project] Still create LVM even hosts dont have enough space

2021-01-25 Thread Jorge Rúa
Something like this would do the trick: In this case I'm using loop0 instead of sdb. If loop0 size is higher than 2 GB (assuming no conversion to MB, that would be great too). It will set lv_size var to 500M, and thar value will be used in lvol task otherwise it will use default lv size which is

Re: [ansible-project] [WARNING]: - linux-system-roles.network was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/':

2021-02-01 Thread Jorge Rúa
If you don't have access to the internet, then you'll have to mirror the required content into your network somehow. FYI: https://galaxy.ansible.com/docs/using/installing.html You can also consider running an Pulp instance to server ansible content too: https://github.com/pulp/pulp_ansible HTH,

Re: [ansible-project] [WARNING]: - linux-system-roles.network was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/':

2021-02-02 Thread Jorge Rúa
By mirror I mean cloning, downloading content from ansible-galaxy and placing it into a server in your network. This server can then expose the very same content via http/s, git protocols. So you'll need to come up with an strategy to fetch content upstream to your network. After you've built your

Re: [ansible-project] Re: facts to txt file

2021-03-26 Thread Jorge Rúa
Something like this could do the trick - name: Dump vars hosts: all connection: local gather_facts: True tasks: - name: Dump hostvars delegate_to: localhost copy: content: "{{ hostvars[inventory_hostname] | to_nice_json }}" dest: /tmp/setup-{{

Re: [ansible-project] any_errors_fatal doesn't fail with unreachable hosts

2021-03-11 Thread Jorge Rúa
I've tried the following with a vanilla ansible.cfg (nothing but defaults) mkdir ~/temp ➜ temp cat test.yml - hosts: all serial: 1 max_fail_percentage: 1 gather_facts: false tasks: - ping: ➜ temp cat inventory [all] unreachable localhost ➜ temp ansible-playbook -i inventory

Re: [ansible-project] any_errors_fatal doesn't fail with unreachable hosts

2021-03-10 Thread Jorge Rúa
What happens if you add serial:1 and max_fail_percentage:1 and removing any_errors_fatal directive? On Wed, Mar 10, 2021, 21:35 Mark Faine wrote: > > I'm trying to ping servers and fail immediately at the first one that is > unreachable. However, this doesn't seem to work. I found this old

Re: [ansible-project] Fetch AWS Secret in playbook

2021-03-20 Thread Jorge Rúa
Remove the single commas on all arguments otherwise they will be literally interpreted as strings. wild: "{{ lookup(aws_secret='DigiCertCA', bypath=true, region='us-east-1', aws_access_key='{{dev_access_key}}', aws_secret_key='{{dev_secret_key}}' )}}" On Sat, Mar 20, 2021, 10:30 amkur p wrote:

Re: [ansible-project] Plybook with community.vmware modules & inventory item issue

2021-03-06 Thread Jorge Rúa
You should modify your hosts entry to point to inventory vms and delegate to localhost vmware tasks. Hope that helps, Regards El sáb, 6 mar 2021 a las 8:54, esxi...@gmail.com () escribió: > Hi > > I am using community.vmware related modules in a playbook .. which updates > tags & reboot

Re: [ansible-project] Plybook with community.vmware modules & inventory item issue

2021-03-06 Thread Jorge Rúa
Yep, that should do the trick. El sáb, 6 mar 2021 a las 21:20, esxi...@gmail.com () escribió: > Thanks for the reply .. So you mean change below > > > --- > - hosts: localhost > gather_facts: false > connection: local > > to > > --- > - hosts: New-VM-Section > gather_facts: false >

Re: [ansible-project] Cronjobs using ansible

2021-04-07 Thread Jorge Rúa
Have a look to your /etc/cron.{allow,deny} On Wed, Apr 7, 2021, 12:16 Gurudatta Nadig wrote: > Good day team, > > We are planning to run the Cron using anisble, while running we are > getting the following message (You (tomcat) are not allowed to use this > program (crontab) Any pointer. > >

Re: [ansible-project] Re: How to find Virtual or Physical?

2021-08-24 Thread Jorge Rúa
Have a look to virt-what On Tue, Aug 24, 2021, 17:38 Roberto Paz wrote: > I required to do that ìn the past and the best way I found was to access > the kernel information: > > *shell: 'dmesg | grep "Hypervisor detected"'* > > I had to identify VMWare-based VMs or Physical server at that time.

Re: [ansible-project] break this up into tasks and roles and variables

2021-08-24 Thread Jorge Rúa
Remove the leading - character on the - hosts line. On Tue, Aug 24, 2021, 13:59 Tony Wong wrote: > ok so here is what i have > > s3_bucket.yml > > --- > - hosts: localhost > name: create s3 bucket > become: yes > > roles: > - s3_bucket > >

Re: [ansible-project] break this up into tasks and roles and variables

2021-08-24 Thread Jorge Rúa
Splitting a single task into a role does not make much sense to me. But if you want to go ahead with it, just pass any variables you are currently using in your task, to the role. Something like this: - include_role: name: role-s3bucket-creator apply: delegate_to: localhost

Re: [ansible-project] how to run a shell command within a playbook repeatedly

2021-10-20 Thread Jorge Rúa
I would not run a shell script with the command module. You should use the script module instead. But ideally if you have the option use the mongodb_shard module. This piece of code actually uses with_sequence to illustrate how to generate a sequence of numbers that will then used to populate port

Re: [ansible-project] DNS module

2021-10-18 Thread Jorge Rúa
First and foremost, this is a general recommendation when writing to mailing list: avoid screenshots as they are not accessible for everyone, plus avoid searching for similar issues. Second, i only see that you are trying to render an erb template with some parameters. So you should learn about

Re: [ansible-project] how to run a shell command within a playbook repeatedly

2021-10-20 Thread Jorge Rúa
You can define a data structure, a dict for example containing number of shards per server an individual shard settings etc. Then just use with_sequence to iterate from 1 to length of the aforementioned shards list. On Wed, Oct 20, 2021, 08:02 Hareesh Vn wrote: > Hi Team > > Below is problem

Re: [ansible-project] Issue ---- Module Failure\nSee stdout/stderr

2021-10-15 Thread Jorge Rúa
gt;> >>> >>> On Thu, Oct 14, 2021 at 9:29 PM Dick Visser wrote: >>> >>>> The advice given should work. >>>> Please share your exact playbook once again. >>>> >>>> >>>> On Fri, 15 Oct 2021 at 01:22, Abhijot S

Re: [ansible-project] Issue ---- Module Failure\nSee stdout/stderr

2021-10-14 Thread Jorge Rúa
Obviously, you would need to run the join domain task against the newly created VM. To do that you should use delegate_to. I would change your inventory to all, and then on the vmware related tasks use delegate_to: localhost since what is happening behind the scenes are just soap/rest api calls

Re: [ansible-project] Want to add hidden password for url

2021-10-22 Thread Jorge Rúa
Have you considered using secrets? On Fri, Oct 22, 2021, 14:50 vaishnavi kakad wrote: > Hi All, > > How we can add the hidden password in Ansible ? > > For eg : > - name: Download image files > get_url: > url: http://0.0.0.0/XYZ.tar.gz > url_username:XYZ > *url_password: *

Re: [ansible-project] How to append the new group to the existing AllowGroups line in /etc/ssh/sshd_config

2021-10-28 Thread Jorge Rúa
Try this: https://dpaste.com/5ENHWDV7Q Remember to update the sshd_config to the proper path ie. /etc/ssh/sshd_config ➜ ~ grep '^AllowGroups' sshd_config AllowGroups a b c ➜ ~ ansible-playbook -i localhost, allow.yml PLAY [Configure sshd groups]

Re: [ansible-project] Re: Find line in file

2021-11-03 Thread Jorge Rúa
If it never fails is just because you are iterating over items and registering the result of each iteration. So the condition is only evaluated only on the last iteration. On Wed, Nov 3, 2021, 00:27 'Neil Young' via Ansible Project < ansible-project@googlegroups.com> wrote: > Oops. Disregard

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread Jorge Rúa
Hey! We can't access the playbook here - https://pastebin.com/edit/9Uvjdupe at least I can't. pastebin redirects me to the login page. I can however access default_postgres.yml file I'm going to assume you are using sudo as become_method. I am also going to assume selinux is not part of the

Re: [ansible-project] Unknown error with arguments of roles

2021-12-12 Thread Jorge Rúa
You either change it to ca.ca.owner_name or remove the second 'ca' for each dict member. On Sun, Dec 12, 2021, 13:51 Axel Rau wrote: > Hi all, > > I have a role lr_nsupdate so: > - - - > - name: Show calling args > debug: > var: ca > > - name: Update DNS master server >

Re: [ansible-project] A general question about looping

2021-12-10 Thread Jorge Rúa
Have a look to with_sequence On Fri, Dec 10, 2021, 22:05 Mike Eggleston wrote: > I know I can do this from a shell script. I wonder if I can do this in > pure Ansible. > I was thinking about clusters recently. I know I can use the VM module to > spin up a VM. > If I wanted 1,000 nodes, how

Re: [ansible-project] Create a list from a dictionary cycle

2022-07-12 Thread Jorge Rúa
I think there's an typo here. There's an extra 't' in list_of_servers: "{{ tarr|flatten }}" should be list_of_servers: "{{ arr|flatten }}" On Tue, Jul 12, 2022, 14:24 Softmax23 wrote: > When i do > arr: "{{ servers|dict2items| > groupby('value')| >

Re: [ansible-project] Ansible - KAFKA Integration

2022-06-10 Thread Jorge Rúa
This is an extremely interesting question. Although ansible is designed to work in push mode, would be possible to push the payload to a queue so an ansible agent subscribed to that queue can fetch that later on? Thanks, On Thu, Jun 9, 2022, 13:30 Madhan Sagadevan wrote: > Hello, > > I

Re: [ansible-project] Ansible - KAFKA Integration

2022-06-10 Thread Jorge Rúa
? On Fri, Jun 10, 2022, 11:44 'Chiku' via Ansible Project < ansible-project@googlegroups.com> wrote: > There is ansible-pull command if your concern is about pull strategy > https://docs.ansible.com/ansible/latest/cli/ansible-pull.html > > On 10/06/2022 12:31, Jorge Rúa wrote: > &

Re: [ansible-project] vmware_guest_network - removing NIC - task completes but does not remove NIC

2022-06-10 Thread Jorge Rúa
I'd encourage you to this the other way around. First of all not sure why the ova is still using e1000 but that's a separate issue. I'd say to modify your ova and reupload it with the vmxnet3 adapter already set up. And the end of the day an ova is just a tar file with some metadata. Give it a try

Re: [ansible-project] Getting an error...

2022-12-09 Thread Jorge Rúa
I'd try two things if I were on your shoes: - Increase memory on the ansible controller - Update python to a more up-to-date version Regards, El vie, 9 dic 2022 a las 21:44, Mike Eggleston () escribió: > I’ve set “forks = 1” and rerun my test which does an ansible-playbook and > an

Re: [ansible-project] Issue when iterating over hostvars attribute

2023-07-11 Thread Jorge Rúa
I've finally managed to get it working by using with_items instead of loop Thanks anyway Vlad, Cheers El mar, 11 jul 2023 a las 21:11, Vladimir Botka () escribió: > On Tue, 11 Jul 2023 20:42:30 +0100 > Jorge Rúa wrote: > > > loop: > > - "{{ hostvars[inven

[ansible-project] Issue when iterating over hostvars attribute

2023-07-11 Thread Jorge Rúa
Hey folks, Not sure if I'm too tired today or what but I'm stuck on a relatively easy task. Here's the thing: I have a task which runs a command for each host in the inventory. For each host, I will need to run this command as many times as elements in "{{

Re: [ansible-project] register not working for uri module

2023-05-18 Thread Jorge Rúa
Your issue is that the register is not part of the module, but of the task. Check your indentation. On Thu, May 18, 2023, 7:01 PM Narmada Karthika wrote: > {"changed": false, "msg": "Unsupported parameters for (ansible.legacy.uri) > module: register. Supported parameters include: ca_path,

Re: [ansible-project] Error: ansible playbook from jenkins

2023-05-03 Thread Jorge Rúa
sshpass: Failed to run command: No such file or directory. Is sshpass in the $PATH for the user running jenkins? On Wed, May 3, 2023, 19:23 Narmada Karthika wrote: > I am facing below problem with running ansible playbook from Jenkins. I > specified the location where I have my ansible playbook