Class: Ansible::Ruby::Modules::Import_role

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb

Overview

Much like the ‘roles:` keyword, this task loads a role, but it allows you to control it when the role tasks run in between other tasks of the play. Most keywords, loops and conditionals will only be applied to the imported tasks, not to this statement itself. If you want the opposite behavior, use M(include_role) instead. To better understand the difference you can read the L(Including and Importing Guide,../user_guide/playbooks_reuse_includes.html).

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

#allow_duplicates:yes, ...

Returns Overrides the role’s metadata setting to allow using a role more than once with the same parameters.

Returns:

  • (:yes, :no, nil)

    Overrides the role’s metadata setting to allow using a role more than once with the same parameters.



29
# File 'lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb', line 29

attribute :allow_duplicates

#defaults_fromString?

Returns File to load from a role’s C(defaults/) directory.

Returns:

  • (String, nil)

    File to load from a role’s C(defaults/) directory.



25
# File 'lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb', line 25

attribute :defaults_from

#nameString

Returns The name of the role to be executed.

Returns:

  • (String)

    The name of the role to be executed.



13
# File 'lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb', line 13

attribute :name

#private:yes, ...

Returns This option is a no op, and the functionality described in previous versions was not implemented. This option will be removed in Ansible v2.8.

Returns:

  • (:yes, :no, nil)

    This option is a no op, and the functionality described in previous versions was not implemented. This option will be removed in Ansible v2.8.



33
# File 'lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb', line 33

attribute :private

#tasks_fromString?

Returns File to load from a role’s C(tasks/) directory.

Returns:

  • (String, nil)

    File to load from a role’s C(tasks/) directory.



17
# File 'lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb', line 17

attribute :tasks_from

#vars_fromString?

Returns File to load from a role’s C(vars/) directory.

Returns:

  • (String, nil)

    File to load from a role’s C(vars/) directory.



21
# File 'lib/ansible/ruby/modules/generated/utilities/logic/import_role.rb', line 21

attribute :vars_from