I have a list:
list1
- value1
- value2
and I want to use set_fact create a new variable that contains these
variables with a label in front of them, so that this debug task:
- debug:
msg: "{{var1}}"
would result in output that looks like this:
label value1
Hello,
I use Ansible to configure OS which is base for Packer to create AMI
for AWS and disk image for Azure. AMI bases on Amazon Linux and Azure
image on Ubuntu image. The whole process works fine, however somehow
on AMI in /home/ec2-user there is (an empty) ~wawrzek/.ansible/tmp
directory.
I seem to be able to query hostvars for a particular host from the command
line and get at the inventory variables
but I haven't figured out how to do this in a playbook. Might it be from
hostvars being lazily loaded - or my lack of
understanding how to access hostvars inventory variables
YAY!!
On Wed, May 1, 2019 at 5:04 PM James Cassell
wrote:
> On Wed, May 1, 2019, at 4:27 PM, Guy Matz wrote:
> > Thanks, but that didn't exactly help. I'm not able to figure out what
> I'm
> > missing . . . any other thoughts? Thanks again!!!
> > here's the output from '--only-changed':
> >
This should show 'configured paths' for searching for a module
`ansible -m debug -a 'msg={{ lookup("config", "DEFAULT_MODULE_PATH")
}}' localhhost`, to this you need to add any library/ directories in
your roles or adjacent to your playbooks.
--
--
Brian Coca
--
You received this
oooh goood. THANK YOU VERY MUCH <3
--
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
Hi all,
I am writing a ansible playbook which will gather all the failed count from
script and after sum it will display in the report.
For example: shell script fails that is called from the ansible fails with exit
1, 2 for different cases with diff error message after the script runs in
Please don't spam this mailing list with repetitive queries.
On Thu, 2 May 2019 at 16:38, Jonathan Lozada De La Matta <
jloza...@redhat.com> wrote:
> - name: Setup information
> setup:
>
> if using the defaults. Look at
> https://docs.ansible.com/ansible/latest/modules/setup_module.html
>
> On
https://docs.ansible.com/ansible/latest/modules/setup_module.html
Also run this adhoc command to gather info about all your hosts at once,
then check which variables can be used for IP related information:
#ansible all -m setup | less
On Thu, 2 May 2019 at 14:18, wrote:
> Can you give me a
On Thu, 2 May 2019 at 04:48, wrote:
> Can you give me a documentation?
>
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html
https://stackoverflow.com/questions/52291149/ansible-to-get-the-netmask-in-cidr
oh my god. Thank very much <3
--
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
So I have resolved my issue thanks to others advice what worked is to
1. stat the file get its mtime and
2. register and
3. assign it to a variable and the same for the current date and
4. put both variables and include to convert them to an INT into a jinja
subtraction arithmetic and divide
On 02.05.19 13:14, Jean-Yves LENHOF wrote:
>> and the result is:
>>
>> ok: [host1] => {
>> "msg": {
>> "0": {
>> "backing_datastore": "datastore1",
[...]
>> },
>> "1": {
>> "backing_datastore": "datastore1",
[...]
>> }
>> }
>> }
>>
>> Good, i need second ("1") hard disk info, but when
When i'm use disk_facts.guest_disk_facts[1] the result is:
fatal: [host1]: FAILED! => {"msg": "The task includes an option with an
undefined variable. The error was: dict object has no element 1\n\nThe
error appears to have been in '/root/playbook/operations/ListVMvalues.yml':
line 50,
Le 02/05/2019 à 08:40, lander7...@gmail.com a écrit :
Hi, i'm use this playbook
---
- hosts: host1
gather_facts: false
connection: local
tasks:
- name: Gather fact datastore
vmware_datastore_facts:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
Le 02/05/2019 à 09:02, lander7...@gmail.com a écrit :
Hi, i use this playbook:
---
- hosts: host1
gather_facts: false
connection: local
tasks:
- name: Gather disk facts from virtual machine using name
vmware_guest_disk_facts:
# Unirse a vsphere
hostname: "{{ hostname }}"
- name: Setup information
setup:
if using the defaults. Look at
https://docs.ansible.com/ansible/latest/modules/setup_module.html
On Thu, May 2, 2019 at 5:49 AM wrote:
> I want to use ansible -m setup in playbook to take ip information and I
> dont know how to do it
>
> --
> You received
I want to use ansible -m setup in playbook to take ip information and I
dont know how to do it
--
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
Can you give me a documentation?
--
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
Can you give me a documentation
--
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
Use ansible facts. Read about them more in the documentation section.
On Thu, 2 May 2019, 12:44 , wrote:
> I need ip, gateway and netmask info
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop
I need ip, gateway and netmask info
--
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
Hi, i use this playbook:
---
- hosts: host1
gather_facts: false
connection: local
tasks:
- name: Gather disk facts from virtual machine using name
vmware_guest_disk_facts:
# Unirse a vsphere
hostname: "{{ hostname }}"
username: "{{ username }}"
I know to use this task:
- name: Add HardDisk
vmware_guest:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: no
folder: /
name: "{{vm}}"
disk:
- size_gb: "{{gb}}"
Create a
Hi, i'm use this playbook
---
- hosts: host1
gather_facts: false
connection: local
tasks:
- name: Gather fact datastore
vmware_datastore_facts:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
datacenter: Datacenter
There was some additional information in the log file
(/opt/log/ansible.log), so posting its content
2019-05-02 11:58:58,802 p=7595 u=vicky | ansible-playbook 2.7.10
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/vicky/.ansible/plugins/modules',
I was exploring ansible and the first step i tried was getting some
information from a router (a virtual gns3 image).
I am able to connect to the device using ssh, get into it's cli and run
commands normally but not via ansible.
I ran asnible playbook with -v option( ansible-playbook -v
27 matches
Mail list logo