Hi Everyone,
I am new to Ansible , I have created new inventory yml file with below
details .
KafkaNonprodservers:
hosts:
abc.abc.com:2022
abd.abd.com:2022
ansible_user : abc
but I am getting below error
+ ansible-inventory -i ./ansible/Hosts.yml --list [WARNING]: Skipping
I am using a different config management tool up to now (not ansible).
I think about switching to ansible.
But I don't like YAML.
I like Python.
Is it doable to use Python syntax instead of YAML?
Is it feasible to do this?
--
You received this message because you are subscribed to the
On 01/02/19 4:12 PM, Thomas Güttler wrote:
I am using a different config management tool up to now (not ansible).
I think about switching to ansible.
But I don't like YAML.
Ansible embraces YAML.
I like Python.
Is it doable to use Python syntax instead of YAML?
Technically, yes. But
Am Freitag, 1. Februar 2019 12:33:48 UTC+1 schrieb Sudheer S:
>
>
> On 01/02/19 4:12 PM, Thomas Güttler wrote:
>
> I am using a different config management tool up to now (not ansible).
>
> I think about switching to ansible.
>
> But I don't like YAML.
>
> Ansible embraces YAML.
>
> I like
YAML is great; I was confused at first because I thought it was a "markup
language" like HTML, but it's just a way to represent data structures.
It's not a programming language, though. If you want to write your system
configuration in a programming language (Python, in this case :^), you
On 01.02.2019 14:22, Lewis Carroll wrote:
I am trying to figure out how to use replace or lineinfile to remove a
domain entry in sssd.conf. Here is example:
[domain/example]
cache_credentials = false
enumerate = true
ldap_schema = rfc2307
ldap_rfc2307_fallback_to_local_users = true
Am Freitag, 1. Februar 2019 15:20:14 UTC+1 schrieb Josh Smift:
>
> YAML is great; I was confused at first because I thought it was a "markup
> language" like HTML, but it's just a way to represent data structures.
>
> It's not a programming language, though. If you want to write your system
>
I am trying to figure out how to use replace or lineinfile to remove a
domain entry in sssd.conf. Here is example:
[domain/example]
> cache_credentials = false
> enumerate = true
> ldap_schema = rfc2307
> ldap_rfc2307_fallback_to_local_users = true
> ldap_search_base = dc=example,dc=com
>
if you know that then its pretty easy to leanr YML. Specially when the
ansible documents have a lot of examples.
On Fri, Feb 1, 2019 at 8:07 AM Thomas Güttler
wrote:
>
>
> Am Freitag, 1. Februar 2019 12:33:48 UTC+1 schrieb Sudheer S:
>>
>>
>> On 01/02/19 4:12 PM, Thomas Güttler wrote:
>>
>> I
Thanks Matt, that worked.
On Thursday, January 31, 2019 at 6:13:46 PM UTC, Matt Martz wrote:
>
> To place it in hostvars you need to name it `ansible_become_flags`:
>
>
> https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#list-of-behavioral-inventory-parameters
>
> On Thu,
Hi Deepak,
ansible_user is a special variable used by ansible for ssh, part of the
main config. If you use a different variable name in your config file you
should be fine.
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#list-of-behavioral-inventory-parameters
On Fri, 1
I would take a look at Troposphere. It is a Python project that creates
JSON / YAML for Cloudformation scripts. Very similar to what you want to
do. I have not heard of the same project for Ansible
https://github.com/cloudtools/troposphere
On Friday, February 1, 2019 at 5:42:53 AM UTC-5,
Am Freitag, 1. Februar 2019 15:26:21 UTC+1 schrieb Joe Langdon:
>
> I would take a look at Troposphere. It is a Python project that creates
> JSON / YAML for Cloudformation scripts. Very similar to what you want to
> do. I have not heard of the same project for Ansible
>
>
Nice. I new I was missing something. I went with the second option. It
replaced all the text with a blank line. The former left a blank line for
each match.
On Friday, February 1, 2019 at 9:11:59 AM UTC-6, Kai Stian Olstad wrote:
>
> On 01.02.2019 14:22, Lewis Carroll wrote:
> > I am trying to
KafkaNonprodservers:
hosts:
abc.abc.com:2022
abd.abd.com:2022
vars:
ansible_user: abc
On Fri, 1 Feb 2019 at 16:12, Keif Gwinn wrote:
> sorry got the wrong idea, I'm also new to ansible.
>
> The variables you're adding need to go under a vars section
>
> KafkaNonprodservers:
> hosts:
> -
sorry got the wrong idea, I'm also new to ansible.
The variables you're adding need to go under a vars section
KafkaNonprodservers:
hosts:
- abc.abc.com:2022
- abd.abd.com:2022
vars:
ansible_user: abc
[keif@ansible-lab ansible]$ ansible-inventory -i keif/test.yml --list
{
No, it is not possible
--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this
no, there is very little 'introspection' to the task itself.
--
--
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
Is there a way to do this via win_task_scheduler or otherwise? Priority
setting in win_task_scheduler only affects process priority and not
IO/mem priorities. Anyone has any suggestions?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
On 01.02.2019 21:13, Subhi Andrews wrote:
Thank you, Kai. Will check it out.
So if we can write a script that generates inventory in json format, we
can
directly pass the script to the ansible-playbook command? Did I
understand
that correctly?
That is correct, if a inventory file doesn't
We have our hosts inventory organized by environments. We tend to have
alpha versions of software deployed in our test environment. Are there any
thoughts on keeping the inventory dynamically updated if we decide to move
a host between environment - say from test to dev or from dev to
Hello Deepak,
You're not following the right syntax for a YML inventory. Check the
following link:
https://docs.ansible.com/ansible/latest/plugins/inventory/yaml.html
I don't know what you're trying to do with the " 2022" string there.
It's not valid yaml.
According to the docs in the
On 01.02.2019 20:09, Subhi Andrews wrote:
We have our hosts inventory organized by environments. We tend to have
alpha versions of software deployed in our test environment. Are there
any
thoughts on keeping the inventory dynamically updated if we decide to
move
a host between environment -
Hi,
How defined variable value when other variable for different the 1.
Exemplo
vars:
networkinterface_number: 1
- name: Create network interface
azure_rm_networkinterface:
name: "interface{{networkinterface_number}}"
resource_group: my_resource
virtual_network_name:
Thanks Keif,
I have added vars as port and users, after that it is working fine.
Regards,
Deepak
On Fri, Feb 1, 2019 at 5:12 PM Keif Gwinn wrote:
> sorry got the wrong idea, I'm also new to ansible.
>
> The variables you're adding need to go under a vars section
>
> KafkaNonprodservers:
>
Thank you, Kai. Will check it out.
So if we can write a script that generates inventory in json format, we can
directly pass the script to the ansible-playbook command? Did I understand
that correctly?
Regards,
On Fri, Feb 1, 2019 at 11:26 AM Kai Stian Olstad <
ansible-project+l...@olstad.com>
Hi,
I wrote a parser that will take the output and add it to a dictionary.
I've tested it on a C3850 but you can try it and see if it works on your
device. You may need to modify it to work with your switch (Nexus?). If
your interested I'll put it up on GitHub and provide the link.
Spiro
Hi Hugo,
Thanks a lot , now it is working fine.
Regards,
Deepak
On Fri, Feb 1, 2019 at 8:20 PM Hugo Gonzalez wrote:
> Hello Deepak,
>
> You're not following the right syntax for a YML inventory. Check the
> following link:
>
>
Hi Hugo,
I like your suggestion -- is so close -- and pretty elegant.
However - */etc/ansible/facts.d *is owned by root.
Even though the INI/Property file you loaded was not owned by root,
Only root could have added */etc/ansible/facts.d/**factfile.fact*
Thanks for trying!
Let me know if you
Brian, I find the current usage of "tags" when calling a role via "roles:"
or "include_role/import_role" is counter intuitive. The reason we tag tasks
in our playbooks is for the purpose of filtering which we would expect to
be the case in the above mentioned scenarios as well. But it is not,
Or you could use the ini_file module to remove the section.
On Fri, Feb 1, 2019, 7:23 AM Lewis Carroll I am trying to figure out how to use replace or lineinfile to remove a
> domain entry in sssd.conf. Here is example:
>
> [domain/example]
>> cache_credentials = false
>> enumerate = true
>>
Below ansible-playbook connectivity works fine for all my servers except
server2. Below command fails.
ansible-playbook - /opt/test/scripts/Auto/site.yml -i /opt/test/scripts
/Auto/hosts.txt -e "source_host=server2 execmd=echo source_user=user2"
Output:
(0, '', 'OpenSSH_7.7p1
32 matches
Mail list logo