Difference between revisions of "Ansible lookup plugins"

From wikieduonline
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
* https://docs.ansible.com/ansible/latest/plugins/lookup.html
 
* https://docs.ansible.com/ansible/latest/plugins/lookup.html
 +
[[ansible-doc -t lookup -l]]
 +
[[plugins/lookup/]]
 +
<pre>
 +
<nowiki>
 +
- name: 'you-name'
 +
  value: "{{ lookup('env','YOUR_ENV_VARIABLE') }}"
 +
</nowiki>
 +
</pre>
  
  [[plugins/lookup/]]
+
<pre>
 +
<nowiki>
 +
  - name: 'you-name'
 +
  value: "{{ lookup('env','YOUR_ENV_VARIABLE') | [[string]] }}"
 +
</nowiki>
 +
</pre>
  
 
== Related ==
 
== Related ==
Line 7: Line 20:
 
* <code>[[ansible-doc -t lookup -l]]</code>
 
* <code>[[ansible-doc -t lookup -l]]</code>
 
* [[Ansible plugins]]
 
* [[Ansible plugins]]
 +
* [[Ansible plugin: env]]
 +
* [[Ansible modules]]
  
 
== See also ==
 
== See also ==
* {{Ansible}}
+
* {{Ansible plugins}}
  
 
[[Category:Ansible]]
 
[[Category:Ansible]]

Latest revision as of 12:40, 12 December 2022

ansible-doc -t lookup -l
plugins/lookup/ 

 - name: 'you-name'
   value: "{{ lookup('env','YOUR_ENV_VARIABLE') }}"


 - name: 'you-name'
   value: "{{ lookup('env','YOUR_ENV_VARIABLE') | [[string]] }}"

Related[edit]

See also[edit]

Advertising: