Class: Ansible::Ruby::Modules::Add_host

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/inventory/add_host.rb

Overview

Use variables to create new hosts and groups in inventory for use in later plays of the same playbook. Takes variables so you can define the new hosts more fully. This module is also supported for Windows targets.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#groupsArray<String>, ...

Returns The groups to add the hostname to, comma separated.

Returns:

  • (Array<String>, String, nil)

    The groups to add the hostname to, comma separated.



17
# File 'lib/ansible/ruby/modules/generated/inventory/add_host.rb', line 17

attribute :groups

#nameString

Returns The hostname/ip of the host to add to the inventory, can include a colon and a port number.

Returns:

  • (String)

    The hostname/ip of the host to add to the inventory, can include a colon and a port number.



13
# File 'lib/ansible/ruby/modules/generated/inventory/add_host.rb', line 13

attribute :name