mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Slight tweak to set_fact variable documentation to clarify scope info.
This commit is contained in:
parent
c15d52cc07
commit
4ce6eca8b3
3 changed files with 11 additions and 14 deletions
File diff suppressed because one or more lines are too long
|
@ -24,12 +24,9 @@ author: Dag Wieers
|
||||||
module: set_fact
|
module: set_fact
|
||||||
short_description: Set host facts from a task
|
short_description: Set host facts from a task
|
||||||
description:
|
description:
|
||||||
- This module allows you to set host facts from a task. This can be
|
- This module allows setting new variables. Variables are set on a host-by-host basis
|
||||||
useful for setting facts conditionally or allows to 'export' play
|
just like facts discovered by the setup module.
|
||||||
variables set by 'vars:' or 'vars_files:' to the playbook scope .
|
- These variables will survive between plays.
|
||||||
- In comparison to variables defined in the playbook, global variables
|
|
||||||
can be set conditionally (like any module) and are available in other
|
|
||||||
plays.
|
|
||||||
options:
|
options:
|
||||||
key_value:
|
key_value:
|
||||||
description:
|
description:
|
||||||
|
@ -42,13 +39,13 @@ version_added: "1.2"
|
||||||
examples:
|
examples:
|
||||||
- description: "Example setting host facts using key=value pairs"
|
- description: "Example setting host facts using key=value pairs"
|
||||||
code: |
|
code: |
|
||||||
action: set_fact fact="something" global_fact="${local_var}"'
|
action: set_fact one_fact="something" other_fact="{{ local_var * 2 }}"'
|
||||||
- description: "Example setting host facts using complex arguments"
|
- description: "Example setting host facts using complex arguments"
|
||||||
code: |
|
code: |
|
||||||
action: set_fact
|
action: set_fact
|
||||||
args:
|
args:
|
||||||
fact: something
|
one_fact: something
|
||||||
global_fact: ${local_var}
|
other_fact: "{{ local_var * 2 }}"
|
||||||
notes:
|
notes:
|
||||||
- You can set play variables using the C(set_var) module.
|
- You can set play variables using the C(set_var) module.
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -86,7 +86,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man1,man3}/
|
||||||
cp -v docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
|
cp -v docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
|
||||||
cp -v docs/man/man3/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3/
|
cp -v docs/man/man3/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3/
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/ansible
|
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/ansible
|
||||||
cp -v library/* $RPM_BUILD_ROOT/%{_datadir}/ansible/
|
cp -rv library/* $RPM_BUILD_ROOT/%{_datadir}/ansible/
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
@ -96,9 +96,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{python_sitelib}/ansible*
|
%{python_sitelib}/ansible*
|
||||||
%{_bindir}/ansible*
|
%{_bindir}/ansible*
|
||||||
%dir %{_datadir}/ansible
|
%dir %{_datadir}/ansible
|
||||||
%{_datadir}/ansible/[a-eg-z]*
|
%{_datadir}/ansible/*/[a-eg-z]*
|
||||||
%{_datadir}/ansible/f[a-hj-z]*
|
%{_datadir}/ansible/*/f[a-hj-z]*
|
||||||
%{_datadir}/ansible/file
|
%{_datadir}/ansible/*/file
|
||||||
%config(noreplace) %{_sysconfdir}/ansible
|
%config(noreplace) %{_sysconfdir}/ansible
|
||||||
%doc README.md PKG-INFO COPYING
|
%doc README.md PKG-INFO COPYING
|
||||||
%doc %{_mandir}/man1/ansible*
|
%doc %{_mandir}/man1/ansible*
|
||||||
|
|
Loading…
Reference in a new issue