Re: [ansible-project] Re: Is there a task/module to create a vaulted file?

2024-05-28 Thread Dick Visser
On Tue, 28 May 2024 at 15:42, Andrew Latham wrote: > Unable to test from current location but do you need to delegate_to for > this? > Yes, I didn't explicitly mention it, but I'm running all the tasks from a dedicated "local" play with these settings: - name: API tasks hosts: foo_hosts #

[ansible-project] Re: Is there a task/module to create a vaulted file?

2024-05-28 Thread Dick Visser
On Tue, 28 May 2024 at 15:17, Dick Visser wrote: > > This seems to work, and because ansible.cfg contains the right information > (vault_identity_list, vault_encrypt_identity) the encrypted content looks > good, when I'm debugging. > But the actual file contents are plain text

[ansible-project] Is there a task/module to create a vaulted file?

2024-05-28 Thread Dick Visser
Hii In one of my playbooks there is a task that is creating a token through an API. As the next task, I would like to store that token somewhere in my vars hierarchy. If it were a plain text variable that would be easy. But I don't seem to be able to safe a vaulted file with a task. One

[ansible-project] set module_defaults globally?

2024-05-28 Thread Dick Visser
Hii I know that it is possible to set defaults for modules: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_module_defaults.html The highest level at which this can be set is play level. But I have many plays, so I'd have to edit all those plays and explicitly define them. I can

Re: [ansible-project] Looping through a register variable

2024-05-23 Thread Dick Visser
Sent from Gmail Mobile On Thu, May 23, 2024 at 16:50 Todd Lewis wrote: > You want stdout_lines rather than stdout. The former is a list with > new-lines removed. The latter is a possibly very long string with the > complete output stream intact. > > - name: Append to all known_host files >

Re: [ansible-project] Use of register variable in following play(s)

2024-05-21 Thread Dick Visser
I would use the dedicated find task. Apply a depth filter just in case. Something like this should do the trick: - name: known hosts script play hosts: all become: true gather_facts: false tasks: - name: Find known hosts ansible.builtin.find: paths: - /root

Re: [ansible-project] depending on extra variables call a template

2024-05-20 Thread Dick Visser
I'm not sure what "call a template which install the actual db" means? There is a template task that can template a file. And if you want to install a db then that would consist of a number of tasks that do that. And I also don't know what a "service catalog" is in an ansible context? Can you

Re: [ansible-project] Ansible and aureport

2024-05-09 Thread Dick Visser
: 0' - 'Number of virt events: 0' - 'Number of keys: 0' - 'Number of process IDs: 49' - 'Number of events: 221' On Thu, 9 May 2024 at 09:28, Dick Visser wrote: > > On Thu, 9 May 2024 at 00:12, John Harmon wrote: > > > > I am running this in my task file (tried shell, co

Re: [ansible-project] Ansible and aureport

2024-05-09 Thread Dick Visser
On Thu, 9 May 2024 at 00:12, John Harmon wrote: > > I am running this in my task file (tried shell, command, and raw). Any idea > why and how to work around the issue?: > > - name: Check number of AVCs > ansible.builtin.raw: "aureport | grep -i avc" > register: avcreport > > - debug: >

Re: [ansible-project] Ansible hangs on gathering facts

2024-04-25 Thread Dick Visser
I would terminate the host and spin up a fresh one. This means your host will be in a known clean state again. On Thu, 25 Apr 2024 at 12:45, Sven Feyerabend wrote: > > Hi everyone, > > I have a host where Ansible used to run correctly. > A while ago, all runs of Ansible on this host started to

[ansible-project] Managing postgres functions/tirggers with ansible

2024-04-17 Thread Dick Visser
Hi,, I'm trying to manage a postgres database with ansible. Database OK, users OK, tables OK. But now I have a table which has a field that should auto update with NOW() upon changes. So far that requires SQL statements like this: CREATE FUNCTION ... CREATE TRIGGER... I looked at

Re: [ansible-project] condition in playbook

2024-04-17 Thread Dick Visser
Hii, I have never seen a task called "template_run", is this something custom that you built? On Wed, 17 Apr 2024 at 09:22, Thirumalai Raja A wrote: > > hi all, > > below is my playbook ia m trying to add some variable in extra_vars: argument > and based on the condition but its giving error

Re: [ansible-project] Get_url

2024-04-10 Thread Dick Visser
Too bad, that would have helped to indicate SSL issues on that remote host. Try running with more verbosity (-vvv) and see what that returns. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

Re: [ansible-project] Get_url

2024-04-10 Thread Dick Visser
Are you able to use curl on that remote host with the same URL and credentials? Sent from Gmail Mobile On Wed, 10 Apr 2024 at 07:36, Prady A wrote: > Hi experts > > I ve been trying get_url in Aix server but no luck yet.. > > > In Linux the below ansible code is working > > get_url: >

Re: [ansible-project] retries/loop for a bunch of tasks

2024-04-03 Thread Dick Visser
You could put the tasks from the block in a separate file, and then include that with include_tasks. That does allow you to loop over it. On Wed, 3 Apr 2024 at 14:37, Azadeh Amirhosseini wrote: > > Hi All, > > how can I implement 'retries:' for a bunch of tasks. Unfortunately it does > not

[ansible-project] Re: ipaddr always compresses IPv6 addresses

2024-04-02 Thread Dick Visser
On Tue, 2 Apr 2024 at 21:44, Dick Visser wrote: > Is there a way to keep the original format? > Or a more generic filter that can (de)compress IPv6 addresses? To answer my own question, it seems there is: ipv6form. The docs are mangled though: https://docs.ansible.com/ansible/latest/colle

[ansible-project] ipaddr always compresses IPv6 addresses

2024-04-02 Thread Dick Visser
Hii, I noticed that the ipaddr filter seems to compress IPv6 addresses. For example I feed a list to ipaddr that contains (among other things) uncompressed IPv6 addresses: --- - name: Testing hosts: localhost connection: local gather_facts: no vars: ips: - 192.168.178.1 -

Re: [ansible-project] different log_path per ansible-playbook run?

2024-04-02 Thread Dick Visser
thx, we already use a shell wrapper anyway so this is easy to do. On Tue, 2 Apr 2024 at 17:32, Brian Coca wrote: > > Most configuration settings are not templatable, but you can always do > it when calling it: > for playname in "play1 play2 play3"; do > ANSIBLE_LOG_PATH="ansilbe.${playname}.log"

[ansible-project] different log_path per ansible-playbook run?

2024-04-02 Thread Dick Visser
Hii I am currently logging output of playbook runs by setting in ansbile.cfg: log_path = ansible.log What would be the simplest way to have one file per playbook run? I tried to use jinja in ansible.cfg but that didn't work... thx Dick -- You received this message because you are subscribed

Re: [ansible-project] "Dirty" find printout question

2024-03-27 Thread Dick Visser
It may be easier and less noisy to pick the path attribute and drop the loop altogether: - name: print collection result ansible.builtin.debug: msg: "{{ log_search.files | map(attribute='path') }}" On Wed, 27 Mar 2024 at 00:17, Alex Wanderley wrote: > Yes, it worked like a

[ansible-project] what is the default for DEFAULT_GATHER_TIMEOUT?

2024-03-25 Thread Dick Visser
Hii While upgrading ansible we run into a deprecation warning: [DEPRECATION WARNING]: DEFAULT_GATHER_TIMEOUT option, the module_defaults keyword is a more generic version and can apply to all calls to the M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions, use module_defaults

Re: [ansible-project] Ternary or when in ansible

2024-03-07 Thread Dick Visser
On Thu, 7 Mar 2024 at 16:02, Prady A wrote: > Hi again > > For simplicity I thought to do like this. > > Current code > - name: Subscribe my repo >shell: | > subscription-manager register bla bla > > > *After* > > - name: Subscribe US REPO >shell: | > subscription-manager

Re: [ansible-project] trigger --ask-become-pass with playbook variable?

2024-02-22 Thread Dick Visser
On Wed, 21 Feb 2024 at 20:53, Evan Hisey wrote: > Why not use the "-K" when launching ansible-playbook? That will trigger > prompting fo the sudo password securely. > Because I don't want to have to remember to use it. I have several playbooks, some of them require -K and some of them do not.

Re: [ansible-project] trigger --ask-become-pass with playbook variable?

2024-02-21 Thread Dick Visser
name: vim > > state: present > > > > *From:* ansible-project@googlegroups.com > *On Behalf Of *Dick Visser > *Sent:* Wednesday, February 21, 2024 9:53 AM > *To:* ansible-project@googlegroups.com > *Subject:* [ansible-project] trigger --ask-become-pass with pla

[ansible-project] trigger --ask-become-pass with playbook variable?

2024-02-21 Thread Dick Visser
Hii, I would like to have a playbook trigger the asking of the become password, but I couldn't find how to do it. Is there perhaps some variable that can be set in a playbook (or play) to do this? I was thinking of something like "ask_become_pass: true" or something like that. thx Dick -- You

Re: [ansible-project] vars_prompt variables carry over into next tasks

2024-02-20 Thread Dick Visser
I *think* the vars from vars_prompt are tied to localhost in the first play, so if you need them in any next plays, you would need to reference them as localhost's hostvars: {{ hostvars['localhost'].pemno }} (not tested) On Tue, 20 Feb 2024 at 14:10, Dimitri Yioulos wrote: > Good morning. >

Re: [ansible-project] 'dict object' has no attribute....

2024-02-13 Thread Dick Visser
On Tue, 13 Feb 2024 at 17:35, Kathy L wrote: > When I make Todd's changes, I get the same original error EXCEPT it tells > me CentOS is not a dict, even though I am targeting a Debian box. > > Dick, are you saying that the file all.yml in the group_vars folder does > not need to be explicitly

Re: [ansible-project] 'dict object' has no attribute....

2024-02-13 Thread Dick Visser
On Tue, 13 Feb 2024 at 15:33, Kathy L wrote: > Default.yml is at the playbook level in a folder called group_vars. It is > being read in by my playbook like this: > > vars_files: > - group_vars/default.yml > If 'group_vars' is adjacent to your playbook, then 'group_vars/default.yml' would

Re: [ansible-project] 'dict object' has no attribute....

2024-02-13 Thread Dick Visser
Does the same thing happen for all distros? Or only for Debian/CentOS, and not for Rocky/Ubuntu? -- 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

Re: [ansible-project] 'dict object' has no attribute....

2024-02-13 Thread Dick Visser
On Tue, 13 Feb 2024 at 14:22, Kathy L wrote: > I've been working this issue for a week now. The code used to work > perfectly and now it fails. Here is the error I get: > Logic dictates that something has changed. Did you upgrade anything? Or otherwise make changes? That would be the obvious

[ansible-project] What characters are allowed in a vault-id?

2024-01-30 Thread Dick Visser
As it says on the tin. What are the requirements for a vault-id? Length? Characters? What not? Looking at the docs I'm guessing it cannot contain @ or ; but is there more? thx Dick -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] Re: Error in huge template - how to find the culprit?

2024-01-25 Thread Dick Visser
93326b4cadd127bceb9ca6bb7e204a > > Run like: python j2generated.py < template.j2 > > On Thu, Jan 25, 2024 at 9:36 AM Dick Visser wrote: > >> with extra debugging: >> >> >> The full traceback is: >> Traceback (most recent call last): >> File >&

[ansible-project] Re: Error in huge template - how to find the culprit?

2024-01-25 Thread Dick Visser
but at that place nothing seems relevant On Thu, 25 Jan 2024 at 15:08, Dick Visser wrote: > Hii, > > I have a template that has a lot of variables and control structures. I > get an error during the playbook run: > > fatal: [prod_nagios2]: FAILED! => change

[ansible-project] Error in huge template - how to find the culprit?

2024-01-25 Thread Dick Visser
Hii, I have a template that has a lot of variables and control structures. I get an error during the playbook run: fatal: [prod_nagios2]: FAILED! => changed=false msg: |- AnsibleError: Unexpected templating type error occurred on ( ): 'NoneType' object is not iterable The content of

Re: [EXTERNAL] [ansible-project] Re: Regarding No space left on device error

2024-01-25 Thread Dick Visser
On Thu, 25 Jan 2024 at 11:30, Ashok Reddy wrote: > Hi Ehisey, > > I have posted the issue, which I have been facing. Sorry for causing > inconvenience and thanks for your inputs. > So far it's not even clear where your error occurs. You did not supply basic information such as: * what the

Re: [ansible-project] [ansible project] VM snapshot capture using VMware

2024-01-21 Thread Dick Visser
Just as “Snapshot_name”: “upgrade-{{vm_hostname}} “ has a trailing space.. On Mon, 22 Jan 2024 at 05:50, Rilindo Foster wrote: > Is that a space before snapshot (right where it says “Task” in the JSON > request)? Was that part of the request or did you insert that by mistake > when you copied

Re: [ansible-project] Incomprehensible error message

2024-01-18 Thread Dick Visser
On Thu, 18 Jan 2024 at 19:12, 'Rowe, Walter P. (Fed)' via Ansible Project < ansible-project@googlegroups.com> wrote: > If you install a collection via ansible-galaxy how do you keep it updated? > Is there a galaxy command to refresh all your existing collections and > plugins? > I don't know but

Re: [ansible-project] Incomprehensible error message

2024-01-18 Thread Dick Visser
On Thu, 18 Jan 2024 at 13:22, 'Rowe, Walter P. (Fed)' via Ansible Project < ansible-project@googlegroups.com> wrote: > This raises a good observation. It is easy to keep ansible updated. It is > not so evident how one can keep their collections updated. > > How do others keep their collections

Re: [ansible-project] Regarding No space left on device error

2024-01-18 Thread Dick Visser
This could be about not enough inodes Try this and see if the IUse% is near 100%: df -i On Thu, 18 Jan 2024 at 06:54, Ashok Reddy wrote: > Hi All, > > I have been facing the following issue: > > /home/ansible/.ansible/tmp/ansible-tmp: No space left on device. > > I have cleared the space

Re: [ansible-project] Another report creation problem

2024-01-15 Thread Dick Visser
I think you'd need to explicitly iterate over the list for that: content: | {% for host in ansible_play_hosts %} {{ host }}: The following packages will be updated: {% for package in hostvars[host]['output'] %} {{ package }} {% endfor %} {% endfor %} On Mon, 15 Jan 2024 at

Re: [ansible-project] Issue creating symbolic link

2024-01-11 Thread Dick Visser
On Thu, 11 Jan 2024 at 20:50, Todd Lewis wrote: > dest: "{{ '/usr/share/' + guacamole_tomcat + > '/.guacamole/guacamole.properties' }}" > With the strings defined outside the jinja block, it's a bit clearer: dest: "/usr/share/{{ guacamole_tomcat }}/.guacamole/guacamole.properties" -- You

Re: [ansible-project] Issue creating symbolic link

2024-01-11 Thread Dick Visser
The error can't be any clearer. The symlink you're trying to create already exists as a directory Sent from Gmail Mobile On Thu, 11 Jan 2024 at 20:25, lift...@gmail.com wrote: > I know this should be trivial, but I just cannot get it to work. I'm > trying to create a symbolic link in my

Re: [ansible-project] Enable module in Ansible

2024-01-11 Thread Dick Visser
I don't know, but this sounds more like a RHEL issue than an ansible issue... On Thu, 11 Jan 2024 at 15:41, lift...@gmail.com wrote: > I am working on a role to install Apache Guacamole. One of the > dependencies that has to be installed is libssh2-devel, but that's not > available on RHEL

Re: [ansible-project] ERROR! Unexpected Exception, this is probably a bug: module 'argcomplete' has no attribute 'autocomplete'

2024-01-10 Thread Dick Visser
On Wed, 10 Jan 2024 at 10:52, Arunkumar Paramasivam wrote: > I installed ansible using homebrew and was working until recent update What was updated? Homebrew? or ansible? or both? or? Also, homebrew isn't listed as an installation method on

Re: [ansible-project] How to set ansible facts to logs

2024-01-05 Thread Dick Visser
On Fri, 5 Jan 2024 at 08:23, Siddharth Thakur < siddharth.thakur.professio...@gmail.com> wrote: > Can you share any web-link where I can find more information regarding > tree and more details. > https://docs.ansible.com/ansible/latest/collections/ansible/builtin/tree_callback.html -- You

Re: [ansible-project] add the computer group in ou security group and give full permission

2024-01-04 Thread Dick Visser
We need a little more context... Sent from Gmail Mobile On Thu, 4 Jan 2024 at 17:57, Nagesh sheregar wrote: > Hi team, > > do we have any playbook we can add the computer group in ou security group > and give full permission > > -- > You received this message because you are subscribed to the

Re: [ansible-project] execute Synchronize module in AAP 2.3

2023-12-13 Thread Dick Visser
On Wed, 13 Dec 2023 at 14:43, Prady A wrote: > Thank you for your direction and suggestion.. > actually we want to sync http folder not a file > Is there any way I can sync between 2 servers.? > You can, with the synchronize module. But as explained above, your specific setup includes

Re: [ansible-project] execute Synchronize module in AAP 2.3

2023-12-13 Thread Dick Visser
Hii If it really is just one file, you can use the copy module... -- 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

Re: [ansible-project] Statement not executed or executed statement has no resultset

2023-12-04 Thread Dick Visser
On Mon, 4 Dec 2023 at 17:15, Narmada Karthika wrote: I am able to run the same playbook on jenkins server directtly, not using > jenkins job Then problem is with 'using jenkins job', ie how ansible is invoked, not with ansible itself. Also, what did the logs on the server side tell you? --

Re: [ansible-project] Issue with Ansible URI module execution for Spectrum API

2023-12-04 Thread Dick Visser
On Mon, 4 Dec 2023 at 16:40, premkumar G wrote: > Hello Ansible Community, > > I'm currently facing an issue while trying to execute a Spectrum API call > using the Ansible URI module. The API call is working fine in Postman, but > when I try to replicate it in Ansible, I encounter problems. >

Re: [ansible-project] Statement not executed or executed statement has no resultset

2023-12-01 Thread Dick Visser
n Fri, Dec 1, 2023 at 10:54 PM Dick Visser wrote: > >> That sounds like something specific to your script, which entirely >> depends on your environment >> >> >> Sent from Gmail Mobile >> >> >> On Sat, 2 Dec 2023 at 02:43, Narmada Karthika &

Re: [ansible-project] Statement not executed or executed statement has no resultset

2023-12-01 Thread Dick Visser
That sounds like something specific to your script, which entirely depends on your environment Sent from Gmail Mobile On Sat, 2 Dec 2023 at 02:43, Narmada Karthika wrote: > I am getting below error when trying to execute an Insert mssql query, the > row is getting inserted but somehow

Re: [ansible-project] error configuring grub-pc

2023-11-28 Thread Dick Visser
Sent from Gmail Mobile On Tue, 28 Nov 2023 at 17:43, Kathy L wrote: > I have an ansible playbook running against a Debian 10 VM. At the top of > my playbook I have this environment variable: > environment: > DEBIAN-FRONTEND: noninteractive That variable has a

Re: [ansible-project] ansible script error

2023-11-24 Thread Dick Visser
Hii, On Fri, 24 Nov 2023 at 13:56, Suresh Vemula wrote: > Hi All, > > Facing below error , while running command, anything im missing here?? > can any one help me on this issue . > Not really, we have no idea what testbed-cli.sh is. We can guess from the output, but that is not how it works.

Re: [ansible-project] Error with message: "winrm or requests are not installed, No module named 'winrm' ", despite having these 2 things installed

2023-11-20 Thread Dick Visser
On Mon, 20 Nov 2023 at 16:21, Axel Padilla wrote: Everything was working fine until I updated it to the latest version of > Ansible. > Logically that is the cause of your problem. To solve it we need more context. Which of the methods mentioned on

Re: [ansible-project] Regarding file changes in Ansible

2023-11-16 Thread Dick Visser
that is very little information... answers to these would help: - what is in that gitlab repository? - what is "the file" - what are "servers" - what does your inventory look like? etc etc On Thu, 16 Nov 2023 at 14:47, Ashok Reddy wrote: > Hi, > > I have been trying to implement the

Re: [ansible-project] Synchronize module failing

2023-11-16 Thread Dick Visser
On Thu, 16 Nov 2023 at 13:56, Prady A wrote: > Hi Experts > > One doubt with synchronize module > > - name: Unix common script deployment > synchronize: > src: “{{ playbook_dir }}/shellscript” > Dest: /tmp/patch_impl > delegation_to: all > > In this ansible code it

Re: [ansible-project] ignoring docker interface when getting interface list

2023-11-16 Thread Dick Visser
Instead of looping over all interfaces and applying a condition to each iteration, you can also filter the list to not include those names. It will be cleaner for your output as well. So instead of: with_items: "{{ ansible_interfaces }}" You could do: with_items: "{{ ansible_interfaces |

Re: [ansible-project] using extra-vars with list and dict

2023-11-16 Thread Dick Visser
According to https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#defining-variables-at-runtime you can use the JSON notation to pass in a list. So you extra vars param should look like: --extra-vars '{"server_ip": ["10.100.1.1", "10.2.1.3", "9.3.1.2a"]}' On Thu,

Re: [ansible-project] Error reading config file (/etc/ansible/ansible.cfg): Source contains parsing errors: '' [line 4]: ' 3 \n' #601

2023-11-14 Thread Dick Visser
On Mon, 28 Mar 2022 at 13:09, omodotun Babatope wrote: > Hello Anthony, > > Greetings to you. > > Hope my email finds you well. > > I am trying to connect to my linux ubuntu and centOS VM using this > IP: 13.67.227.239 & 13.89.200.76 > I have this error:

Re: [ansible-project] UNREACHABLE!

2023-11-13 Thread Dick Visser
On Mon, 13 Nov 2023 at 14:47, Василий Арутюнов wrote: > Hello, pls help me understand this error; I've been trying to fix it for > the second day and can't figure it out > > TASK [Gathering Facts] > ** > fatal:

Re: [ansible-project] Ansible_ECS Community Module for External

2023-11-09 Thread Dick Visser
https://docs.ansible.com/ansible/latest/collections/community/aws/ecs_service_module.html#parameter-deployment_controller Sent from Gmail Mobile On Thu, 9 Nov 2023 at 21:21, Cesar Ramirez wrote: > Hi All, > How to get support for a module community.aws.ecs.service so it creates > the service

Re: [ansible-project] Issue escaping curly braces in template file

2023-11-06 Thread Dick Visser
If you need this a lot then you could even dedicate a filter to it. For example, create a directory called 'filter_plugins' adjacent to your playbook and then create a file called 'filters.py' that contains: def embrace(string): return '{' + string + '}' class FilterModule(object): def

Re: [ansible-project] How to make sure that values for all keys with same name are strings?

2023-11-03 Thread Dick Visser
can remember padding with a space to keep an ID a string that the > consumer filters out but YMMV > > On Fri, Nov 3, 2023 at 6:57 AM Dick Visser wrote: > >> Hii, >> >> I have a structure like this: >> >> --- >> state: >> owner_id: 036001814778 >

[ansible-project] How to make sure that values for all keys with same name are strings?

2023-11-03 Thread Dick Visser
Hii, I have a structure like this: --- state: owner_id: 036001814778 environments: - name: prod owner_id: 036001814778 foo: bar: - name: xasdf owner_id: 036001814778 - name: acc owner_id: 036001814778 bar: baz nest:

Re: [ansible-project] AWX Microsoft Teams Webhook Notification Issue

2023-11-02 Thread Dick Visser
Hii This is the ansible list. You might get better responses on the dedicated awx list. Sent from Gmail Mobile On Thu, 2 Nov 2023 at 10:26, Alex wrote: > Hello, > I'm experiencing an issue with sending notifications to a Microsoft Teams > channel using a webhook connection. I received the

Re: [ansible-project] Jinja template cannot fetch '0.10' value

2023-10-24 Thread Dick Visser
If your input is supposed to be yaml, then the 0.10 value will be interpreted as a float. If you want it to be a string, you have to quote it (although you don't want to). It cannot be two types at the same time Sent from Gmail Mobile On Tue, 24 Oct 2023 at 11:46, dudu.c...@gmail.com wrote:

[ansible-project] ansible-vault format

2023-10-23 Thread Dick Visser
Hii, I've always wondered what the format of the ansible vault is, more specifically why it consists of only numbers, as that seems like an insufficient way to represent data. It is as if the content has to go through some medium that can only understand digits? Dick -- You received this

Re: [ansible-project] Running update grub-pc in noninteractive mode

2023-10-23 Thread Dick Visser
the drive to > install grub-pc on. > > > On Mon, Oct 23, 2023 at 7:31 AM Kathy Lyons wrote: > >> That's great - thank you! >> >> Now, does anyone know how I can do an "update grub-pc" with that >> particular hard drive so it doesn't prompt me for

Re: [ansible-project] Running update grub-pc in noninteractive mode

2023-10-23 Thread Dick Visser
What exactly do you mean by 'update packages'? We're using Debian EC2 instances and never had to bother with manually selecting disks/devices... On Mon, 23 Oct 2023 at 12:14, Kathy L wrote: > We are trying to update packages on several AWS servers via ansible. In > the beginning of our

Re: [ansible-project] mitogen and playbook_name

2023-10-17 Thread Dick Visser
My initial reaction would be: this looks like a workaround for something that does not exist, probably for a reason. And then you add mitogen to the mix, which is notorious for pushing the limits with many things. What is the use case for this playbook_name variable? Sent from Gmail Mobile

Re: [ansible-project] Need help

2023-10-15 Thread Dick Visser
On Sun, 15 Oct 2023 at 08:24, Y.G Kumar wrote: > Hi All, > > Thanks for the responses. I am facing another issue with env variables. > > I want to register a variable to capture the output of a shell command as > shown below. So far its fine.. > But I also want to save that command result in a

Re: [ansible-project] Formatting the dict items with debug

2023-10-14 Thread Dick Visser
;> ** >> >> TASK [debug the result] >> ******** >> ok: [localhost] => { &g

Re: [ansible-project] Formatting the dict items with debug

2023-10-14 Thread Dick Visser
Try piping it through from_json first Sent from Gmail Mobile On Sat, 14 Oct 2023 at 14:43, Veera wrote: > I need only the output or the value of the below(trying to set_fact the > access_token) > access_token": "xx" > > > > > On Saturday, Octob

Re: [ansible-project] Formatting the dict items with debug

2023-10-14 Thread Dick Visser
What is your desired output then?? Sent from Gmail Mobile On Sat, 14 Oct 2023 at 10:01, Veera wrote: > Hi, > > I have the below output from my playbook using > - debug: > msg: "{{ result.stdout }}" > > TASK [debug] >

Re: [ansible-project] Need help

2023-10-12 Thread Dick Visser
On Thu, 12 Oct 2023 at 15:41, Y.G Kumar wrote: > Hi All, > > I am declaring an environment variables in a playbook as shown below: > -- > --- > - hosts: localhost > environment: > script_var1: hi > script_var2: there > tasks: > - name: List > shell: bash test.sh > -- > > I

[ansible-project] ansible meta 'end_playbook'?

2023-10-10 Thread Dick Visser
Hii There is the 'end_play' meta task that will end the current play. We use playbooks that have several plays, so end_play will just end that specific play, and then continue to the next play. Is there a way to stop the entire playbook? I would welcome a 'end_playbook' meta action :) thx Dick

Re: [ansible-project] Simpler way to define many handlers?

2023-10-08 Thread Dick Visser
ansible.builtin.import_role: name: handlers It is a bit clunky but it does work and at least the handlers are defined only once. Dick On Fri, 25 Aug 2023 at 00:10, Vladimir Botka wrote: > On Thu, 24 Aug 2023 17:46:58 +0200 > Dick Visser wrote: > > > Is there perh

Re: [ansible-project] ansible.builtin.password generating invalid passwords

2023-10-02 Thread Dick Visser
On Mon, 2 Oct 2023 at 14:26, Kathy L wrote: > I am using ansible core version 2.14.3. When I generate a username in the > following fashion: > >set_fact: > passwd: "{{ lookup('ansible.builtin.password', '/dev/null', > chars=['ascii letters', 'digits'], length=range(10,15) | random )

Re: [ansible-project] Ansible Collections community.general: 403 Forbidden

2023-10-02 Thread Dick Visser
Hii Sounds like something specifically for AWX, so you might get more response on the dedicated AWX list/group... On Mon, 2 Oct 2023 at 09:19, Jerome Arellano wrote: > Hello, > > Has someone experienced an error when syncing projects? > > error encountered: > *ERROR! Failed to download

Re: [ansible-project] shell module with become_user does not function correctly

2023-09-27 Thread Dick Visser
On Wed, 27 Sep 2023 at 22:52, 'Terry Lemons' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi - I'm having trouble using the shell module with become_user. As a > basic test, I created this playbook: > > - name: Retrieve environment variables for root > shell: printenv > > -

Re: [ansible-project] Removing collections

2023-09-19 Thread Dick Visser
I don't have a silver bullet, but to avoid surprises with collections in multiple locations, you can hard code the collections path in your ansible.cfg. We use 'ansible-core' (not 'ansible') from a python venv, and when setting that up, we install the collections in there:

Re: [ansible-project] Install multiple named packages with 'community.general.zypper'

2023-09-18 Thread Dick Visser
On Mon, 18 Sept 2023 at 22:16, 'Terry Lemons' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi - I need to install ~30 specific packages on a SLES 15 system using > Ansible. Instead of specifying 30 individual 'community.general.zypper' > tasks, I'd like to run a single

Re: [ansible-project] Ansible 'user' module won't set expected password

2023-09-18 Thread Dick Visser
On Mon, 18 Sept 2023 at 21:43, 'Ansible Project' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi - I'm trying to use the ansible.builtin.user module to set the user's > password as it creates a new user account. My task contains: > > - name: Create oracle user >

Re: [ansible-project] Re: Regarding not to proceed further if ansible task fails

2023-09-18 Thread Dick Visser
On Mon, 18 Sept 2023 at 09:03, Ashok Reddy wrote: > Hi John, > > I have configured the meta_play: end_play in roles where the task has > failed but it will not exit . > Can you please guide me? > Please focus on the actual problem, and respond to Todd's mail and provide the requested data. --

Re: [ansible-project] ansible ucs intersight error

2023-09-16 Thread Dick Visser
uot;: "uuidpool.Pool", "CreateTime": "2023-09-14T20:34:57.18Z", > "Description": "liprd-uuid-pool", "DomainGroupMoid": > "64fb3cbd7564613301d27633", "ModTime": "2023-09-14T20:34:57.187Z", "Moid": >

Re: [ansible-project] ansible ucs intersight error

2023-09-15 Thread Dick Visser
Type": "uuidpool.UuidBlock", "Size": 100, "To": >> "-0064"}]}, "changed": false, "trace_id": >> "Cvz_QEUlWzAC1sIt_gToSQMndG0T9FtgfA7_j4r87Gdy62jJzp_eTQ=="} >> >> TASK [create_pools : Create U

Re: [ansible-project] ansible ucs intersight error

2023-09-15 Thread Dick Visser
: Bad Request', > b'{\"code\":\"InvalidRequest\",\"message\":\"Cannot execute the request. > The JSON document is > malformed.\",\"messageId\":\"barcelona_request_malformed_json\",\"traceId\":\"VZYagTdrbBl92Gj4eP

Re: [ansible-project] Perform Monitoring of MongoDB Replicaset using ansible

2023-09-15 Thread Dick Visser
> arrangement. > > I have not tested it yet but happy to get feedback on the playbook, if > it's looking allrite > > Regards > Amit > > On Thu, Sep 14, 2023 at 3:45 PM Dick Visser wrote: > >> >> Sent from Gmail Mobile >> >> >> On Thu, 1

Re: [ansible-project] ansible ucs intersight error

2023-09-15 Thread Dick Visser
On Fri, 15 Sept 2023 at 00:30, Tony Wong wrote: > The dictionary loop is not working. But when I specify the parameters not > in a dictionary and not in a loop it works. > Run that with -v, and then compare the invocation dict with the one above that fails. -- You received this message

Re: [ansible-project] ansible ucs intersight error

2023-09-14 Thread Dick Visser
It says malformed json, so that's pretty obvious. Try running with -v to (hopefully) see what's being posted as json and there should be your solution. Sent from Gmail Mobile On Thu, 14 Sep 2023 at 19:09, Tony Wong wrote: > any idea why I keep getting this error with this pb? > > --- > -

Re: [ansible-project] Perform Monitoring of MongoDB Replicaset using ansible

2023-09-14 Thread Dick Visser
Sent from Gmail Mobile On Thu, 14 Sep 2023 at 18:45, Amit Kulkarni wrote: > Hello All, > > I need to monitor MongoDB replica set using Ansible > How is this monitoring supposed to happen? I'm asking because ansible is a configuration management tool. Monitoring is usually done with

Re: [ansible-project] Re: Regarding not to proceed further if ansible task fails

2023-09-13 Thread Dick Visser
On Wed, 13 Sept 2023 at 09:43, Ashok Reddy wrote: > Hi Brian, > > Did not configure the ignore_errors in playbook > You didn't show any playbook so far, just (fuzzy pictures of computer screens with) task files that are included. If you can post the TEXTUAL version of the playbook that includes

Re: [ansible-project] Re: Regarding not to proceed further if ansible task fails

2023-09-06 Thread Dick Visser
Hii What you describe is nonstandard behaviour. Instead of guessing, please show us your playbook and any other relevant code. Sent from Gmail Mobile On Thu, 7 Sep 2023 at 01:47, Ashok Reddy wrote: > Hi Brian > > Noted and Thanks for your response. > But, when we tried to download

Re: [ansible-project] access particular values gathered with stat

2023-09-06 Thread Dick Visser
On Wed, 6 Sept 2023 at 14:34, dulhaver via Ansible Project < ansible-project@googlegroups.com> wrote: > I want to check for existence of a folder and also the right owner, group > and mode. > When any of the conditions (exists, owner=postgres, group=postgres, > mode=0755) does not meet

Re: [ansible-project] Inventory file to csv

2023-09-02 Thread Dick Visser
Hii, What does your current playbook look like? On Sat, 2 Sept 2023 at 01:25, Prabhakar P wrote: > Hi > > Any one created a playbook for collecting the certificates from all > servers in use, which can write to csv or excel > > Any help appreciated > > Thanks > > -- > You received this message

Re: [ansible-project] What do you think about my first ansible role?

2023-08-30 Thread Dick Visser
Hii This list is more intended for help with specific ansible problems, not to review generic content without any context. If you have specific questions, then please ask those. Also, sending binaries is a red flag for obvious reasons... On Wed, 30 Aug 2023 at 15:57, Robert wrote: > Hello >

Re: [ansible-project] extracting key and certificate

2023-08-29 Thread Dick Visser
On Tue, 29 Aug 2023 at 20:30, Mahesh Nalavade wrote: > Hi All, > > Anyone has done this before. > This is your chance to become that person! You did start already, please let us know your findings :) -- You received this message because you are subscribed to the Google Groups "Ansible

Re: [ansible-project] KVM/Qemu Running playbook from host

2023-08-29 Thread Dick Visser
Hii You are overcomplicating things by first doing a stat on /usr/bin/pip. Besides that, the existence of that path is a very fragile way of detecting if the python3-package is installed. If you only want to install something if it is not installed already, then that is just what the apt module

Re: [ansible-project] Re: KVM/Qemu Running playbook from host

2023-08-29 Thread Dick Visser
On Mon, 28 Aug 2023 at 21:28, Amit Kumar wrote: > Hi > > demouser does exist on the system. The simple playbook is printing debug > message. > > --- > - name: Testing if everything works on the remote > hosts: ubuntu-servers > gather_facts: false > tasks: > - name: Hello Server > debug: > msg:

  1   2   3   4   5   6   7   8   9   10   >