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

2024-02-13 Thread Kathy Lyons
Todd- thank you for clearing that up for me I made default.yml all.yml amd reran things with the same errors. I am running my roles from within a playbook like this. - roles - role1 become: true - role2 become: true On Tue, Feb 13, 2024 at 2:51 PM Todd Lewis wrote: > This

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

2023-10-23 Thread Kathy Lyons
A generic Deb 11 image - not one we "own". On Mon, Oct 23, 2023 at 8:50 AM Dick Visser wrote: > What AMI are you using? > > On Mon, 23 Oct 2023 at 13:34, Kathy Lyons wrote: > >> Dick - just this morning I went to update packages on an AWS instance and >> it fa

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

2023-10-23 Thread Kathy Lyons
Dick - just this morning I went to update packages on an AWS instance and it failed because the disk was not /dev/sda. I had to logon to the box, issue apt update -y, then a dialog popped up asking me for the drive to install grub-pc on. On Mon, Oct 23, 2023 at 7:31 AM Kathy Lyons wrote

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

2023-10-23 Thread Kathy Lyons
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 the disk drive? On Mon, Oct 23, 2023 at 7:15 AM Dick Visser wrote: > What exactly do you mean by 'update packages'? > We're using Debian EC2 instances

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

2023-10-23 Thread Kathy Lyons
The only issue is that I don't know what the name of the disk is - /dev/sda, dev/nvme0n1p1, etc. On Mon, Oct 23, 2023 at 6:36 AM Thanh Nguyen Duc wrote: > You may try to gather fact, register the fact then execute the command in > the next task. For me i usually use shell to query what i need

Re: [ansible-project] mitogen and playbook_name

2023-10-18 Thread Kathy Lyons
should print   "your playbook name goes here" ... On 17.10.23 19:34, Kathy Lyons wrote: When I print out "{{ ansible_play_name }}" I simply get "localhost." On Tue, Oct 17, 2023 at 12:18 PM 'Philippe Kueck' via Ansible Project <mailto:ansible-project@googlegroups

Re: [ansible-project] mitogen and playbook_name

2023-10-17 Thread Kathy Lyons
When I print out "{{ ansible_play_name }}" I simply get "localhost." On Tue, Oct 17, 2023 at 12:18 PM 'Philippe Kueck' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi, > > On 17.10.23 18:13, Kathy Lyons wrote: > > We use

Re: [ansible-project] mitogen and playbook_name

2023-10-17 Thread Kathy Lyons
We use it in many instances to only do something for a specific playbook. We have about 5 playbooks that work on different networks and rather than maintain 5 different playbooks we use the "when playbook_name == abc.yml" a lot. Is there another way to get the playbook name? On Tue, Oct 17, 2023

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

2023-10-02 Thread Kathy Lyons
Sorry, that was a typo on my part. The real text was ascii_letters. Darn fat fingering. On Mon, Oct 2, 2023 at 9:59 AM Todd Lewis wrote: > Your 'ascii letters' should be 'ascii_letters' (with an underscore); > maybe that's throwing things off? > > On 10/2/23 8:26 AM, Kathy L wrote: > > I am

Re: [ansible-project] using with_sequence with a block

2023-09-05 Thread Kathy Lyons
That worked out well, thank you! On Tue, Sep 5, 2023 at 9:44 AM Richard Megginson wrote: > You could put the tasks that you want to run in the loop in a separate > tasks file, then use include_tasks with with_sequence > > On Tue, Sep 5, 2023 at 7:39 AM Kathy Lyons wrote: > >&

Re: [ansible-project] using with_sequence with a block

2023-09-05 Thread Kathy Lyons
Thanks. Any idea how I would then add these users to the system without using a block? I forgot to put this last part of the code I'd like to use in. - name: Add users user: name: "{{ username }}" password: {{ "passwd" }} shell: /bin/bash On Tue, Sep 5, 2023 at 8:37 AM 'Rowe,

Re: [ansible-project] edit string in a multi-line file

2023-07-27 Thread Kathy Lyons
That will work - yes. I was so focused on using lineinfile or another ansible module, I forgot about sed. Thank you! On Thu, Jul 27, 2023 at 10:09 AM dulhaver via Ansible Project < ansible-project@googlegroups.com> wrote: > would this do what you want? > > > - name: edit a line in a file >

Re: [ansible-project] random length password

2023-04-18 Thread Kathy Lyons
I looked at that, but we want to vary the length of the password each time this is run. On Tue, Apr 18, 2023 at 12:30 PM Abhijeet Kasurde wrote: > Have you tried - > > - name: Generate random string with length 12 > ansible.builtin.debug: > var: lookup('community.general.random_string',