Class: Ansible::Ruby::Modules::Set_fact
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Set_fact
- Includes:
- FreeForm
- Defined in:
- lib/ansible/ruby/modules/generated/utilities/logic/set_fact.rb,
lib/ansible/ruby/modules/custom/utilities/logic/set_fact.rb
Overview
This module allows setting new variables. Variables are set on a host-by-host basis just like facts discovered by the setup module. These variables will be available to subsequent plays during an ansible-playbook run, but will not be saved across executions even if you use a fact cache. Per the standard Ansible variable precedence rules, many other types of variables have a higher priority, so this value may be overridden. See L(Variable Precedence Guide,../user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) for more information. This module is also supported for Windows targets.
Instance Method Summary collapse
-
#cacheable ⇒ :yes, ...
This boolean indicates if the facts set will also be added to the fact cache, if fact caching is enabled.
-
#key_value ⇒ Object
The C(set_fact) module takes key=value pairs as variables to set in the playbook scope.
Methods included from FreeForm
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
#cacheable ⇒ :yes, ...
Returns This boolean indicates if the facts set will also be added to the fact cache, if fact caching is enabled.
19 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/set_fact.rb', line 19 attribute :cacheable |
#key_value ⇒ Object
Returns The C(set_fact) module takes key=value pairs as variables to set in the playbook scope. Or alternatively, accepts complex arguments using the C(args:) statement.
15 |
# File 'lib/ansible/ruby/modules/generated/utilities/logic/set_fact.rb', line 15 attribute :key_value |