Thanks so much - I was able to do this using:
when: (ansible_distribution == 'AlmaLinux')
And that is working as expected.
On Fri, 5 Aug 2022 at 08:28, Paul Manno wrote:
> Have you looked at the full ansible_facts for that OS? Maybe there is
> another value you can use other than os_family.
inside the variable you are looking at".
>
> That means you either have the wrong variable (and 'result' is to be found
> in a different variable) or you have the correct variable, but there is
> nothing called "result" inside it.
>
> Regards, K.
>
December 2018 16:29:56 UTC, Karl Auer wrote:
>
> The line where you set new_ami_id, immediately below set_fact:, does not
> appear to be indented correctly. Indent it a few spaces and try again.
>
> Regards, K.
>
>
> On Wed, Dec 5, 2018 at 3:17 AM shaneoh1980 McP >
n with an undefined variable. The error was: 'new_ami_id' is
undefined\n\nThe error appears to have been in
'/opt/ansible-scripts/update/create-ami.new.yml': line 21, column 7, but
may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears t
new_ami_id: ami.results[0].image_id
>
> you need:
> new_ami_id: "{{ ami.results[0].image_id }}"
>
> Regards, K.
>
> On Wed, Dec 5, 2018 at 2:14 AM shaneoh1980 McP > wrote:
>
>> After more searching I also tried this:
>>
>> ---
>> - hosts: webserv
t 15:26, Karl Auer wrote:
> You need to wrap wrap the variable up in curly braces so that it is
> interpreted rather than taken literally.
>
> I.e., where you have:
> new_ami_id: ami.results[0].image_id
>
> you need:
> new_ami_id: "{{ ami.results[0].image_id }}"
>
&g
AMI.
On Tuesday, 4 December 2018 12:04:52 UTC, shaneoh1980 McP wrote:
>
> I am trying to create a playbook which does the following:
>
>
>- creates an image of an AWS instance
>- copies the image to a different region
>- installs updates to the instance
>
I am trying to create a playbook which does the following:
- creates an image of an AWS instance
- copies the image to a different region
- installs updates to the instance
I can do all of this apart from getting the AMI to copy to a different
region. I've tried a few things but this