Class: Ansible::Ruby::Modules::Set_fact

Inherits:
Base show all
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

Methods included from FreeForm

included, #to_h

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

#cacheable:yes, ...

Returns This boolean indicates if the facts set will also be added to the fact cache, if fact caching is enabled.

Returns:

  • (:yes, :no, nil)

    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_valueObject

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.

Returns:

  • (Object)

    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