Figured out how to merge the lists based on values in each list.
- name: merge lists
set_fact:
merged_list: "{{ merged_list|default([]) + [{
'name': item[0].name,
'size_available': item[0].size_available,
'size_avaliable_80':
Adding further to above, i know i can get the value i want by doing this.
- debug:
msg: "{% for address in net_interface if address.node_name ==
'IQ-REG_NA_CLUSTER_01-01' %}{{ address.address }}{% endfor %}"
Anyway to add that logic when creating the aggregate_info list. for
example,
Hello,
Basically want to add the items of net_interface into aggregate_info or
create new list/dictionary based on key value of node_name. Looking for
assistance on how i can achieve this please and thank you.
Outcome of what want it listed below.
*list called: aggregate_info*
{
"name":
Hello,
Basically want to add the items of net_interface into aggregate_info or
create new dictionary based on key value of node_name. Looking for
assistance on how i can achieve this please and thank you.
*Dictionary called: aggregate_info*
{
"name": "agg_Data1_Cluster01",
"node_name":
What azure module can i use to set the vm generation when creating a new
vm? Figured it would be under azure_rm_virtualmachine.
Would like to make sure it will be created with gen 2.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
t;
> Destination: "C:\\ISOs\\MDT\\DC2019\\"
>
> (Note that apart from the name (which used to be your variable name),
> the dicts are exactly the same - I guess this is just example data and
> in reality these actually differ)
>
>
> If t
l Hard Disks\\DC2019.vhdx"
Destination: "C:\\ISOs\\MDT\\DC2019\\"
large2019:
- config: "DC2019"
InstallMedia:
Source: "someshare\\"
SourceVHDX: "Virtual Hard Disks\\DC2019.vhdx"
Destination: "C:\\ISOs\\MDT\\DC2019\\"
fined variable. The error
was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute
'InstallMedia'\n\nThe error appears to be in
On Tuesday, June 2, 2020 at 2:06:39 PM UTC-5, Stefan Hornburg (Racke) wrote:
>
> On 6/2/20 5:55 PM, Adam McGill wrote:
> > I would like to take the value of the var and pass i
I would like to take the value of the var and pass it into with_items and I
am running into an issue / error, how can i pass just the value into
with_items. If i hardcode and put the value with_items: {{ small2019 }} in
there are no issues. Using include_vars / file which has the data, want
I am using a include_vars file to pipe the variable to a libary/ps1/py file
which will return results / verification. Is there a way to not include
the item data /ansible loop information in the .results data. As I figured
the .results data should only include the data I pipe back from the
I am using a include_vars file to pipe the variable to a libary/ps1/py file
which will return results / verification. Is there a way to not include
the item data /ansible loop information in the .results data. As I figured
the .results data should only include the data I pipe back from the
I took the route of using children groups. Too bad there wasn't a way to
pull a group and pick a value in that group passing to the Hosts: value in
a playbook. Thanks for the assist/suggestions
Stefan.
On Sunday, April 12, 2020 at 1:04:42 AM UTC-5, Adam McGill wrote:
>
>
> Is it
it seems or
there isn't a way to do it. Online documentation referencing a lot with
referencing groups to combine or exclude. Which isn't what i want,
as i just want to reference a name/value in a group.
On Sunday, April 12, 2020 at 1:04:42 AM UTC-5, Adam McGill wrote:
>
>
> Is it
Is it possible to specify in a playbook hosts value to be a group item from
hosts file?
*example:*
Hosts file contains:
[groupone]
comname1
comname2
comname3
in the playbook would like it to grab the group (groupone) but only apply
the playbook routine to a name/value in that group and not
14 matches
Mail list logo