It's outputting your items list, as you have msg on the list if you are looking
to put the info you need to use a register then either var or message that
register
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this gro
On 5/24/20 9:20 PM, Jerry Hwang wrote:
> Hi,
>
> I am trying yum module on AWX (ansible tower).
> AWX -> Inventories -> Run command -> select module: yum etc.
>
> In the "EXTRA VARIABLES" section on AWX WebUI, what I should put in yaml if I
> want to install wget for example.
> I have tried to p
On 5/25/20 4:52 AM, Sadanand Alegaonkar wrote:
> Hello Dick,
>
> Thanks for giving reply,
> Yes corrected this error but the purpose is not getting fulfilled.
>
> I was trying to rename old file in the file system. it is giving below error.
>
> getting "file.results["stdout"]": "VARIABLE IS NOT
On Sun, 24 May 2020 20:31:12 -0700 (PDT)
Andrew Morgan wrote:
> > > 1) get the mac address
> > > 2) get the subnet
> > >
> > > ---
> > > - hosts: dev
> > > become: true
> > > #connection: local
> > > gather_facts: true
> > Run the command below a see what "facts" are available wh
Hi Guys
I am working on Service Asset and Configuration Management and the tool which I
use is Service Now
We have also integrated BMC discovery with Service Now to discover CIs and
relationship between them.
But we do have some challenges with BMC discovery.
Please help me know how Ansible can
tony@ubuntu:~/ansiblework$ ansible-playbook vmware_tools.yml -vvv
ansible-playbook 2.9.0
config file = /home/tony/ansiblework/ansible.cfg
configured module search path = [u'/home/tony/ansiblework/library']
ansible python module location =
/home/tony/.local/lib/python2.7/site-packages/ansible
Thanks.. Working fine now.
Thanks
Geo
On Sun, May 24, 2020 at 10:30 PM Dick Visser wrote:
> The error is correct. You can't add one dict to another using the +
> operand.
> Use combine instead:
>
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#combining-hashes-dict
This is the output:
fatal: [deVPN]: FAILED! => changed=true
cmd: |-
ansible dev -m setup
delta: '0:00:00.033604'
end: '2020-05-24 23:29:51.883830'
msg: non-zero return code
rc: 127
start: '2020-05-24 23:29:51.850226'
stderr: '/bin/bash: ansible: command not found'
stderr_lines
True, but I was hoping I could validate that the variable is not set
to true for more than one host.
On Mon, May 25, 2020 at 12:18 AM Dick Visser wrote:
>
> You could default that variable to true in a single location, so it's easy to
> spot in the inventory?
>
> On Sun, 24 May 2020 at 19:58, An
Hello Dick,
Thanks for giving reply,
Yes corrected this error but the purpose is not getting fulfilled.
I was trying to rename old file in the file system. it is giving below
error.
getting "file.results["stdout"]": "VARIABLE IS NOT DEFINED!" error
On Sun, 24 May 2020 at 22:22, Dick Visser wro
On Sun, 24 May 2020 16:55:52 -0700 (PDT)
Andrew Morgan wrote:
> 1) get the mac address
> 2) get the subnet
>
> ---
> - hosts: dev
> become: true
> #connection: local
> gather_facts: true
Run the command below a see what "facts" are available when "gather_facts:
true" is enabled.
shel
Hello no it's ansible vault password , i thinks can't use lookup for this
Only option i know is ask-vault-pass environment vars and vault password file
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
Hello All,
I have an ansible script that I am writing to use meta data from an aws ec2
instance. I want to create and image of a list og servers from my inventory
file them launch each one, then perform a function then terminate the
instances.I am currently stuck on trying to get the subnet por
On Sun, 24 May 2020 16:13:56 -0700
Tony Wong wrote:
> [WARNING]: provided hosts list is empty, only localhost is available. Note
> that the implicit localhost does not match 'all'
Run the command below a see what's going on
shell> ansible-inventory -vvv --graph
--
You received this message
> On Sun, May 24, 2020 at 4:08 PM James Cassell
> wrote:
> >
> > On Sun, May 24, 2020, at 6:56 PM, Tony Wong wrote:
> > > ---
> > > - name: get info vm
> > > hosts: localhost
> > > connection: local
> > > gather_facts: false
> > > vars:
> > > vm_list:
> > > - dr-reb
> > > - dr-wac
>
Thanks!
but I dont see any output running it
[WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'
PLAY [get info vm]
**
On Sun, May 24, 2020, at 6:56 PM, Tony Wong wrote:
> ---
> - name: get info vm
> hosts: localhost
> connection: local
> gather_facts: false
> vars:
> vm_list:
> - dr-reb
> - dr-wac
> tasks:
> - name: get info about the virtual machine
> vmware_guest_info:
> hostname: vcenter
> usernam
---
- name: get info vm
hosts: localhost
connection: local
gather_facts: false
vars:
vm_list:
- dr-reb
- dr-wac
tasks:
- name: get info about the virtual machine
vmware_guest_info:
hostname: vcenter
username: administrator@vsphere.local
pass
Hi,
I am trying yum module on AWX (ansible tower).
AWX -> Inventories -> Run command -> select module: yum etc.
In the "EXTRA VARIABLES" section on AWX WebUI, what I should put in yaml if
I want to install wget for example.
I have tried to put
name: wget
state: present
also
name:
- wget
stat
wow! it works perfectly!!!
I was going about it the wrong way.. I was decomposing the whole structure
to pieces, to update those and then reconstruct... i was ending up getting
into nested loop issues because I needed to iterate over both the number of
perms and the number of items in the array
You could default that variable to true in a single location, so it's easy
to spot in the inventory?
On Sun, 24 May 2020 at 19:58, Anuj Agrawal wrote:
> I want to validate my inventory to have only a certain number of hosts
> to have a certain value. I tried to do that using assert but I am
> un
This should work:
tasks:
- set_fact:
filtered_users: "{{ filtered_users|default([]) | union( [
item | combine( {'perms': item.perms|difference(['delete']) } )] ) }}"
loop: "{{ my_body|json_query('users[]') }}"
- set_fact:
new_body: "{{ my_body | combine({'users
I want to validate my inventory to have only a certain number of hosts
to have a certain value. I tried to do that using assert but I am
unable to find a way to do so.
Example inventory (ini) file:
[nginx]
10.52.130.31
[backends]
10.52.194.41 read_only="true"
10.52.130.2 read_only="false"
10.52
Also the combine examples seem to allways refer to key / value pairs.. in
the perms list i only have values.. the keys are not present ...
Le dimanche 24 mai 2020 13:04:46 UTC-4, sebastien Morissette a écrit :
>
> Hi Dick,
>
> i've been trying, but the issue is that I am receiving this structre
Hi Dick,
i've been trying, but the issue is that I am receiving this structre back
from a call to an api / rest using uri module,
then I need to post back the updated structure but after many hours i'm not
getting the combine to work as it should..
i'm probably turning arround the solution
Hi, im not entirely sure what you mean but you may want to look at
https://docs.ansible.com/ansible/latest/plugins/lookup/hashi_vault.html
On Sun, 24 May 2020 at 13:54, FERREIRA CHRISTOPHE <
christopheantunesferre...@gmail.com> wrote:
> Hello it's possible to inject vault password with custom p
The error is correct. You can't add one dict to another using the + operand.
Use combine instead:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#combining-hashes-dictionaries
On Sun, 24 May 2020 at 18:23, Geo P.C. wrote:
>
>
> I have two variable definition files as
I would combine this dict with another Dict that what you want.
See
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#combining-hashes-dictionaries
On Sun, 24 May 2020 at 16:44, sebastien Morissette
wrote:
> tested the json in jq, had errors in it.. here is the updated
On Sun, 24 May 2020 at 08:46, Sadanand Alegaonkar <
sadanandalegaon...@gmail.com> wrote:
> SUMMARY
>
> I trynig to take backup of existing file. reported below error
>
> ERROR! failed at splitting arguments, either an unbalanced jinja2 block or
> quotes: cp "{{file.stdout}" "{{file.stdout}}"_bkp
>
I have two variable definition files as follows
*vars.yml*
aws_common_tags:
Project: "{{ project_name }}"
Application: "{{ application_name }}"
Region: "{{ aws_region }}"
Ansible: "Yes"
*instance.yml*
ec2_instance_tags:
environment_name: dev
Now in task.yml I am tryin to create aws ec2 insta
>
> tested the json in jq, had errors in it.. here is the updated json
>
{
"id": "209",
"ownerUserId": "2",
"resource":
"https://abc.inet/v1/acls?id=209&resourceName=ACI_EXTENSION";,
"resourceName": "ACI_EXTENSION",
"role": null,
"tenantAndSubtenantUsers": [
On Saturday, 23 May 2020 00:06:10 UTC+2, Vladimir Botka wrote:
>
>
>
> > There is hiera lookup plugin in Ansible.
> >
> https://docs.ansible.com/ansible/latest/plugins/lookup/hiera.html#hiera-get-info-from-hiera-data
>
> > Would it be possible to post the [mcve] Puppet code of your example? A
>
> The result I am looking for is the following :
>
{
"id": "209",
"ownerUserId": "2",
"resource": "
https://cloudcenter.cp.intactfc.com/v1/acls?id=209&resourceName=ACI_EXTENSION
",
"resourceName": "ACI_EXTENSION",
Hi,
i've been at this for several hours and i'm going in circles so I would
like to see if someone can help me get it right.
Given a dict structure which is a json array, I am looking to modify only
the deeply nested users[*].perms object to remove the "delete" list item..
---
- hosts: loca
Hello it's possible to inject vault password with custom plugin vars or action
? I would like put password in vault hashicorp and i would't put script in host
because is executable by user
I have try loader.set_vault_secrets(vault_secrets) but not work
--
You received this message because you
35 matches
Mail list logo