It does work, it lists the VMs (including UUID) from vCenter. So far, so
good.
But then? How are you supposed to obtain their DNS name or IP in order to
be able to actually connect to them (i.e. use them as hosts)
Thx
Marki
--
You received this message because you are subscribed to the
Hi Team,
I am trying to delete files under a specific directory but not directory.
Please find the below yaml files.
Playbook.yml
---
- hosts: all
tasks:
- name: Ansible remove file
file:
path: "{{ item.dest }}"
state: absent
with_items:
- "{{
Why does your 'playbook' doesn't have "hosts"?
Why does your 'role' have "hosts:"?
On Monday, December 17, 2018 at 1:43:54 AM UTC-8, Ilya Ulis wrote:
>
> I have a role with the following yaml:
> [root@ansible playbooks]# head -n 4 roles/upgrade_couchbase/tasks/main.yml
> - hosts:
I think it is because in your re-written version, there is no loop
construct. Thus the variable "scripts" is being used in full, wherever you
reference it. The problem is that it is a list, not a string. The copy
module wants a string as the source, and expects to be able to check
whether it has a
`with_items` is not deprecated for package manager modules either. What is
deprecated is "squash actions".
More info can be found at
https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actions
Before, when using `with_items`
Ah, I see you are correct - I guess I was assuming that all "with_items"
loops had to be re-written... I was getting "DEPRECIATION WARNING" outputs
for all the "with_items" lists I was using with the 'apt' module. So,
"with_items" is not deprecated across the board? Why was it deprecated for
I don't know what the deprecation warning was that you were experiencing,
but I doubt it was for that task. It was likely for a package manager
task, and not for the copy module.
There should be no deprecation for the task you provide in this email.
On Tue, Dec 18, 2018 at 3:19 PM Willard
What is "LGTM"?
On Wed, Dec 19, 2018 at 2:30 AM chafik bel wrote:
> LGTM as well.
> On Sunday, December 16, 2018 at 11:13:06 AM UTC+1, Stéphane Klein wrote:
>>
>> Hi,
>>
>> What is the best practice to manage project `foobar` uninstall action ?
>>
>> a. Write two playbooks example:
Hi all,
I had a play in one of my roles that used to look like this:
- name: Ensure PRTG monitoring scripts are installed
copy:
src: "{{ item }}"
dest: /var/prtg/scriptsxml/{{ item }}
owner: root
group: root
mode: 0744
with_items:
- get_gpu_watts.py
-
Hi,
I'm using ansible 2.7.
I am trying to set a bunch of dns records for my project using
the gcp_dns_resource_record_set module.
This works just fine:
- name: create a resource record set for {{env}}
gcp_dns_resource_record_set:
name: "{{ env }}.{{ dns_name }}"
managed_zone: "{{
So that message indicates you are trying to merge a string "iamstring"
with a dictionary {key: value}, which means you are using
hash_behaviour=merge and conflicting types for the same variable
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
1) no clue, that would not work with the plugin Ansible ships with
(just tested and vmware plugin skips that file)
2) you are confusing inventory plugins and inventory scripts, the
plugins require a 'source', one of the plugins is the 'script' plugin,
which uses 'inventory scripts' ... these need
... via Mobile Mail
--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to
I have a very odd situation, I have a new installation of CentOS7 on a free
version of VSphere and I'm trying to test out Ansible to configure Windows
computers but I am getting the dreaded Code 500 when trying to do the
win_ping
module from ansible.
I am trying to use basic authentication
Yeah, that would make it easier, but my constraint is at the time of
writing the code, I won't be able to tell which variable needs to be
applied. Most often, all of the servers are going to use the same IP's for
their NTP servers, but I have to leave an option in for one or more servers
to
I found out what 3) is about. You have to change the default inventory= in
ansible.cfg to the directory (just like you specify the directory on the
command line) *duh*
Still wondering about items 1) and 2) though.
--
You received this message because you are subscribed to the Google Groups
On Tue, 18 Dec 2018 08:28:18 -0800 (PST)
Eric Brewer wrote:
> I have a scenario where I need to be able to specify to use the
> group_vars for a NTP timeserver, unless the host_vars are defined.
> All of the variables are going to be coming out of an intermediary
> document that the customer is
also change "=" for ":" in a groups vars
El martes, 18 de diciembre de 2018, 14:41:48 (UTC-3), lalo andres escribió:
>
> ok,
> im change vars to yaml and not work, that's error:
>
> ERROR! failed to combine variables, expected dicts but got a 'dict' and a
> 'AnsibleUnicode':
> {}
>
>
> El
ok,
im change vars to yaml and not work, that's error:
ERROR! failed to combine variables, expected dicts but got a 'dict' and a
'AnsibleUnicode':
{}
El martes, 18 de diciembre de 2018, 14:28:51 (UTC-3), Brian Coca escribió:
>
> group_vars are only supported using YAML or JSON files, not ini.
You are mixing roles and plays in wrong ways.
play == mapping between hosts and tasks (only place 'hosts: ' can
appear is in a play)
role == collection of tasks/vars and other resources that can be
reused in a play
your role has a hosts: entry, which is incorrect, your play does not
have a
group_vars are only supported using YAML or JSON files, not ini.
--
Brian Coca
--
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
Probably register the output, filter by "Current BOOT variable", then apply
some regular expressions to match, and use that again later.
On Tue, 18 Dec 2018 at 17:52, Sahar wrote:
> Hi there,
>
> I have a question.
>
> I'm writing an ansible playbook for my cisco ASA device. As part of the
>
Hey,
I don't get how dynamic inventory is actually working. Or in my case, why
it's working.
So I've tried setting up the vmware_vm_inventory plugin.
I've put a vcenter.yml into /etc/ansible and "ansible-inventory -i
/etc/ansible/ --list" is indeed giving me a list of all statically defined
Hi there,
I have a question.
I'm writing an ansible playbook for my cisco ASA device. As part of the
playbook, I need to reset the "Current BOOT variable" in below output.
sec/stby/Fw4Script(config)# show bootvar
BOOT variable =
I think you need to declare ansible_facts before your variable, and then
you need to iterate through the array so try this:
- name: debug
debug:
msg: "{{ item['name'] }}"
with_items: "{{ ansible_facts['test123'] }}"
And if you don't want to iterate through all of them, you need to call
I have a scenario where I need to be able to specify to use the group_vars
for a NTP timeserver, unless the host_vars are defined. All of the
variables are going to be coming out of an intermediary document that the
customer is going to be filling out, like this:
vars/customer_vars.yml
Howdy folks,
I'm looking for some advice to see if there's a more elegant way to
do an "include_vars" on the output of a filter rather than a file.
I'm using the "passwordstore" module to get secrets out of 'pass'.
This works great for pulling in a single var at a time, but I'd like
to be able
LGTM as well.
On Sunday, December 16, 2018 at 11:13:06 AM UTC+1, Stéphane Klein wrote:
>
> Hi,
>
> What is the best practice to manage project `foobar` uninstall action ?
>
> a. Write two playbooks example: `foobar_install.yml` and
> `foobar_uninstall.yml`
>and two roles
my ansible version is 2.4.2 [CEntos 7]
El martes, 18 de diciembre de 2018, 11:53:16 (UTC-3), lalo andres escribió:
>
> Hello,
> im trying to using a groups vars out side of inventory, but not working
>
> my file struct:
>
> [image: Capture.PNG]
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> work this form:
Hello,
im trying to using a groups vars out side of inventory, but not working
my file struct:
[image: Capture.PNG]
work this form:
eco-sql-dev.ini
[win-mssql]
lab-sql1.DOMAIN.cl
[win-mssql:vars]
ansible_user=svc-ansible-...@domain.cl
ansible_password=PASS
ansible_port=5986
Sounds correct by me.
On Tue, Dec 18, 2018 at 8:17 AM Stéphane Klein
wrote:
> I got one answer here:
> https://www.reddit.com/r/ansible/comments/a7aejq/what_is_the_best_practice_to_manage_project/ec1i98u/
>
> --
> You received this message because you are subscribed to the Google Groups
>
I got one answer here:
https://www.reddit.com/r/ansible/comments/a7aejq/what_is_the_best_practice_to_manage_project/ec1i98u/
--
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,
Thanks, flowerysong.
I went with this:
- set_fact:
names: []
- set_fact:
names: "{{ names + [ item.name ] }}"
with_items: "{{ things |selectattr('name', 'defined') |list }}"
I want to have the list even if it is empty, that's why there are now two
set_fact calls.
As far as the
On Tuesday, December 18, 2018 at 2:47:30 AM UTC-5, Karl Auer wrote:
>
> I am trying to build a list of names from a list of objects. It works
> fine, but some of the objects don't have a name. No problem, I use the
> default() filter to set those elements of my list to empty strings, like
>
34 matches
Mail list logo