Class: Ansible::Ruby::Modules::Include_role
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Include_role
- Defined in:
- lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb
Overview
Loads and executes a role as a task dynamically. This frees roles from the ‘roles:` directive and allows them to be treated more as tasks. Unlike M(import_role), most keywords, including loops and conditionals, apply to this statement. This module is also supported for Windows targets.
Instance Method Summary collapse
-
#allow_duplicates ⇒ :yes, ...
Overrides the role’s metadata setting to allow using a role more than once with the same parameters.
-
#apply ⇒ Hash?
Accepts a hash of task keywords (e.g. C(tags), C(become)) that will be applied to the tasks within the include.
-
#defaults_from ⇒ String?
File to load from a role’s C(defaults/) directory.
-
#name ⇒ String
The name of the role to be executed.
-
#private ⇒ Object?
This option is a no op, and the functionality described in previous versions was not implemented.
-
#public ⇒ :yes, ...
This option dictates whether the role’s C(vars) and C(defaults) are exposed to the playbook.
-
#tasks_from ⇒ String?
File to load from a role’s C(tasks/) directory.
-
#vars_from ⇒ String?
File to load from a role’s C(vars/) directory.
Methods inherited from Base
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.
34 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 34 attribute :allow_duplicates |
#apply ⇒ Hash?
Returns Accepts a hash of task keywords (e.g. C(tags), C(become)) that will be applied to the tasks within the include.
14 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 14 attribute :apply |
#defaults_from ⇒ String?
Returns File to load from a role’s C(defaults/) directory.
30 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 30 attribute :defaults_from |
#name ⇒ String
Returns The name of the role to be executed.
18 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 18 attribute :name |
#private ⇒ Object?
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.
38 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 38 attribute :private |
#public ⇒ :yes, ...
Returns This option dictates whether the role’s C(vars) and C(defaults) are exposed to the playbook. If set to C(yes) the variables will be available to tasks following the C(include_role) task. This functionality differs from standard variable exposure for roles listed under the C(roles) header or C(import_role) as they are exposed at playbook parsing time, and available to earlier roles and tasks as well.
41 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 41 attribute :public |
#tasks_from ⇒ String?
Returns File to load from a role’s C(tasks/) directory.
22 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 22 attribute :tasks_from |
#vars_from ⇒ String?
Returns File to load from a role’s C(vars/) directory.
26 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/include_role.rb', line 26 attribute :vars_from |