To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorAnsibler 0.2.2
ansibler is a Ruby gem for reading and writing Ansible files.
tl;dr
Given an inventory_file
that contains:
host1
host2 ansible_ssh_host=172.31.3.134 ansible_ssh_user=ubuntu
[mysql]
host2
Then
inventory = Ansible::Inventory.read_file('inventory_file')
inventory.hosts.count # => 2
inventory.hosts.first.name # => "host1"
inventory.hosts.last.vars.count # => 2
inventory.hosts.last.vars['ansible_ssh_host'] # => "172.31.3.134"
inventory.groups.count # => 1
inventory.groups.first.name # => "mysql"
inventory.groups.first.hosts.first.vars['ansible_ssh_user'] # => "ubuntu"
Use the source
https://github.com/aisrael/ansibler
Copyright
Copyright (c) 2015 Alistair A. Israel. See LICENSE.txt for
further details.
Topics
Last published over 7 years ago by aisrael.