Ansible examples
Various examples of Ansible code.
(This file is generated. Do not update it manually. See the section below.)
Index
Ansible filter
- ansible.netcommon.ipaddr 254,
- ansible.utils.hwaddr 197,
- ansible.utils.keep_keys 289,
- ansible.utils.remove_keys 289,
- ansible.utils.replace_keys 289,
- cartesian 156,
- combine 111,
- community.general.dict_kv 281,
- community.general.groupby_as_dict 282,
- community.general.jc 284,
- community.general.lists_mergeby 286,
- community.general.path_join 285,
- community.general.version_sort 283,
- d() 245,
- default 245, 257,
- default() 245,
- default(omit) 257,
- dict2items 103,
- difference 98,
- extract 174,
- flatten 119,
- from_yaml 26, 173,
- from_yaml_all 173,
- hwaddr 197,
- intersect 159,
- ipaddr 254,
- json_query 2, 20, 43, 69, 267,
- json_query filter contains 43, 69,
- json_query function merge 290,
- json_query functions 140,
- json_query issue to_yaml|from_yaml 267,
- password_hash 76,
- product 156,
- quote 183,
- regex_replace 135,
- shuffle 202,
- splitext 192,
- strftime 217,
- ternary 180,
- to_datetime 217,
- to_nice_json 26,
- to_yaml 173,
- union 112,
- zip 56,
Ansible keyword
- become 105,
- block 146,
- environment 230,
- post_tasks 229,
- pre_tasks 229,
- register 161,
- retries 109,
- serial 166,
- throttle 275,
- until 109,
- vars_files 97,
- when 146,
Ansible plugins
- Connection 218,
Ansible test
Basics
- Asynchronous actions and polling 87,
- Boolean 151,
- Callback 150,
- Compare dictionaries 253,
- Expansion of expressions 149,
- Expansion of variables 139,
- Fibonacci 70,
- Filters 32,
- Handlers 93,
- Inventory 80,
- Jinja2 204,
- Lazy evaluation 131,
- Loop 176,
- MySQL command 61,
- NFS 227,
- Passwords 34,
- Python 248,
- Quotation 101,
- Role meta platforms 225,
- Roles 141, 178,
- Strings and Lists 38,
- Test include_role, import_role, and tags 124,
- Testing paths 185,
- Vault 53,
- Workflow 133,
- Xen 44,
- ZFS 42,
- always 52,
- async 87,
- block 52,
- falsy 272,
- lookup plugins 39,
- requirements.yml 232,
- rescue 52,
- run_once 46,
- truthy 272,
- vars 136, 178,
Boolean
- and, or, xor 67,
Cache
Callback
Collection
Conditions
- when 96,
Config
- ANSIBLE_ACTION_WARNINGS 115,
- ANSIBLE_CACHE_PLUGIN 261,
- ANSIBLE_COLOR_* 208,
- ANSIBLE_HASH_BEHAVIOUR 143,
- ANSIBLE_KEEP_REMOTE_FILES 222,
- ANSIBLE_PYTHON_INTERPRETER 155,
- ANSIBLE_REMOTE_TMP, ANSIBLE_REMOTE_TEMP 223,
- ANSIBLE_REMOTE_USER 205,
- CONDITIONAL_BARE_VARS 182,
- DEFAULT_JINJA2_NATIVE 260,
- action_warnings 115,
- ansible_python_interpreter 155,
- ansible_remote_tmp 223,
- colors section 208,
- conditional_bare_variables 182,
- filter_plugins 85,
- hash_behaviour 143,
- remote_tmp 223,
- remote_user 205,
Custom filter
- combine_lossless 262,
- dict_flatten 138,
- dict_utils 138,
- mac-vendor-lookup 292,
- netaddr_iter_iprange 254,
Custom module
- Python subprocess.run 163,
Data structure
Delegation
Deprecated
- warning 29,
Devel
- Custom modules 256,
- Development of a module 279,
- Job management (async, async_status, kill, logger, cache) 287,
- Role UBUNTU20-CIS 293,
- Supports_check_mode and changed 279,
- filter_core 291,
- vbotka.ansible.community.general filter any2items 237,
Dictionary
- Create, update, combine 207,
- Iterate dictionary in play 3,
- Iterate dictionary in template 1,
- Select items from dictionary 12,
Handlers
- notify 187,
Import
- import_playbook 15,
Include
Indentation
- Test indentation of a block 13,
Inventory
Jinja
- Jinja template formatting 236,
- Jinja tests 265,
- loop.index 295,
- lstrip_blocks 100,
- trim_blocks 100,
- white-space control 100,
Jinja filter
- batch 268,
- escape 74,
- format 244,
- groupby 88,
- join 162,
- length 259,
- map 16, 41,
- max 215,
- min 215,
- random 59,
- reject 68, 104,
- rejectattr 104,
- reverse 219,
- select 62, 68,
- selectattr 122,
- sort 82,
- trim 4,
- unique 211,
Jinja function
Jinja template
List
Lookup
- ansible.builtin.indexed_items 170,
- ansible.utils.to_paths 280,
- community.general.dig 169,
- dig 169,
- env 116,
- file 210,
- fileglob 106,
- first_found 120,
- inventory_hostnames 271,
- password 145,
- pipe 184,
- subelements 40,
- to_paths 280,
- with_indexed_items 170,
Loop
- Extended loop variables 220,
- Iterate blockinfile from templates 45,
- Nested loops 54,
- extended 220,
- include_tasks 241,
- index_var 6,
- loop include_tasks 8,
- loop include_tasks and delegate_to 14,
- loop_control 6, 220,
- run_once 241,
- with_items vs. loop 243,
- with_lines 95,
- with_sequence 6,
- with_together zip 63,
Math
Module
- add_host 134,
- ansible.builtin.add_host 134,
- ansible.builtin.assert 239,
- ansible.builtin.async_status 5,
- ansible.builtin.blockinfile 123,
- ansible.builtin.command 30, 35, 171,
- ansible.builtin.copy 94,
- ansible.builtin.cron 231,
- ansible.builtin.debug 168,
- ansible.builtin.expect 72,
- ansible.builtin.fail 90,
- ansible.builtin.fetch 203,
- ansible.builtin.file 130,
- ansible.builtin.find 37,
- ansible.builtin.getent 48,
- ansible.builtin.group_by 108,
- ansible.builtin.include_tasks 190,
- ansible.builtin.include_vars 142,
- ansible.builtin.lineinfile 84,
- ansible.builtin.meta 154,
- ansible.builtin.package 198,
- ansible.builtin.package_facts 121,
- ansible.builtin.ping 226,
- ansible.builtin.raw 137,
- ansible.builtin.replace 77,
- ansible.builtin.script 128,
- ansible.builtin.set_fact 22, 167,
- ansible.builtin.set_stats 58,
- ansible.builtin.setup 212,
- ansible.builtin.shell 128, 172,
- ansible.builtin.slurp 235,
- ansible.builtin.stat 127,
- ansible.builtin.tempfile 189,
- ansible.builtin.unarchive 78,
- ansible.builtin.uri 51,
- ansible.builtin.user 11,
- ansible.builtin.wait_for 110,
- ansible.builtin.wait_for_connection 209,
- ansible.builtin.yum 107,
- ansible.netcommon.net_ping 226,
- ansible.posix.synchronize 7,
- ansible.posix.sysctl 238,
- assert 239,
- async_status 5,
- blockinfile 123,
- cisco.ios.ios_ping 226,
- cli_parse 274,
- command 30, 35, 171, 172,
- community.crypto.openssl_* 228,
- community.crypto.x509_certificate 242,
- community.general.cronvar 231,
- community.general.dconf 92,
- community.general.ini_file 102,
- community.general.mail 193,
- community.general.parted 25,
- community.general.read_csv 153,
- community.general.snmp_facts 152,
- community.general.xml 199,
- copy 94,
- creates 35,
- cron 231,
- csv 153,
- dconf 92,
- debug 168,
- expect 72,
- fail 90,
- fetch 203,
- file 130,
- find 37,
- flush_handlers 288,
- get_url 273,
- getent 48,
- group_by 108,
- import_role 124,
- include_role 124,
- include_tasks 190,
- include_vars 142,
- ini_file 102,
- ios_ping 226,
- lineinfile 84, 277,
- mail 193,
- meta 154, 288,
- net_ping 226,
- openssl_* 228,
- package 198,
- package_facts 121,
- ping 226,
- raw 137,
- read_csv 153,
- replace 77,
- script 128,
- set_fact 22, 167,
- set_stats 58,
- setup 212,
- shell 128, 172,
- slurp 235,
- snmp_facts 152,
- stat 127,
- synchronize 7,
- sysctl 238,
- tempfile 189,
- unarchive 78,
- uri 51,
- user 11,
- wait_for 110,
- wait_for_connection 209,
- xml 199,
- yum 107,
Parameter
Playbook
- Run the playbook only on one host per group 47,
Python method
Recursion
- Referencing other dict keys in the same parent dict is not supported 129,
Role
- CIS role UBUNTU20-CIS 293,
- Galaxy role vbotka.ansible_lib 270,
- Galaxy role vbotka.config_light 148,
- Role defaults 266,
- al_bsd_service_facts 270,
Setup
- ansible.builtin.setup 9,
- ansible_interfaces 252,
- ansible_mounts 249,
- gather_facts 9,
- service_facts 9,
Special variables
- ansible_play_batch 255,
- ansible_play_hosts 255,
- ansible_play_hosts_all 255,
- group_names 175,
- groups 113,
Strategy plugin
- host_pinned 221,
String
- Concatenate strings 246,
- match 79,
- regex 79,
- search 79,
- string manipulation 200,
- testing strings 79,
Syntax
Tags
Test
- Galaxy role vbotka.linux_lib 91,
- boolean 294,
- bulk-set task arguments 89,
- items2dict2 114,
- iterable 294,
- mapping 294,
- race conditions 258,
- sequence 294,
- string 294,
Tools
- Debug tools 31,
Utility
Vars
- Precedence of the variables 33,
- Scope of variables 158,
- Special variables 17,
- Substitution 188,
- Test names in a block 23,
- ansible_facts 165,
- facts.d 177,
- group_vars 71,
- host_vars 28,
- hostvars 216,
- vars_prompt, pause 36,
vbotka.ansible_lib
- al_bsd_service_facts 270,
Contents
- Example 1. "Dictionary; Iterate dictionary in template;"
- Example 2. "Ansible filter; json_query; Basics."
- Example 3. "Dictionary; Iterate dictionary in play;"
- Example 4. "Jinja filter; trim;"
- Example 5. "Module; async_status; ansible.builtin.async_status;"
- Example 6. "Loop; with_sequence; loop_control; index_var;"
- Example 7. "Module; synchronize; ansible.posix.synchronize;"
- Example 8. "Loop; loop include_tasks;"
- Example 9. "Setup; gather_facts; service_facts; ansible.builtin.setup;"
- Example 10. "Math; Jinja math;"
- Example 11. "Module; user; ansible.builtin.user; Test module with Ansible 2.6.1 and FreeBSD 11.2"
- Example 12. "Dictionary; Select items from dictionary;"
- Example 13. "Indentation; Test indentation of a block;"
- Example 14. "Loop; loop include_tasks and delegate_to;"
- Example 15. "Import; import_playbook;"
- Example 16. "Jinja filter; map;"
- Example 17. "Vars; Special variables; Print special(magic) variables".
- Example 18. "Include; include_role;"
- Example 19. "Tags; import_playbook and tags;"
- Example 20. "Ansible filter; json_query;"
- Example 21. "Python method; split;"
- Example 22. "Module; set_fact; ansible.builtin.set_fact; Dynamic vars with set_fact."
- Example 23. "Vars; Test names in a block;"
- Example 24. "Include; include_role; include_vars;"
- Example 25. "Module; community.general.parted; Linux only."
- Example 26. "Ansible filter; from_yaml; to_nice_json; netplan conf."
- Example 27. "Utility; ansible-inventory;"
- Example 28. "Vars; host_vars;"
- Example 29. "Deprecated; warning; Invalid deprecation warning message with certain types of syntax errors."
- Example 30. "Module; command; ansible.builtin.command; Test command argv form in 2.6."
- Example 31. "Tools; Debug tools;"
- Example 32. "Basics; Filters;"
- Example 33. "Vars; Precedence of the variables;"
- Example 34. "Basics; Passwords;"
- Example 35. "Module; command; ansible.builtin.command; creates;"
- Example 36. "Vars; vars_prompt, pause;"
- Example 37. "Module; find; ansible.builtin.find;"
- Example 38. "Basics; Strings and Lists;"
- Example 39. "Basics; lookup plugins;"
- Example 40. "Lookup; subelements;"
- Example 41. "Jinja filter; map;"
- Example 42. "Basics; ZFS;"
- Example 43. "Ansible filter; json_query; json_query filter contains;"
- Example 44. "Basics; Xen;"
- Example 45. "Loop; Iterate blockinfile from templates;"
- Example 46. "Basics; run_once;"
- Example 47. "Playbook; Run the playbook only on one host per group;"
- Example 48. "Module; getent; ansible.builtin.getent;"
- Example 49. "Vars; Variable precedence complex."
- Example 50. "Vars; Share variables between playbooks."
- Example 51. "Module; uri; ansible.builtin.uri; Ansible Galaxy API list platforms."
- Example 52. "Basics; block; rescue; always;"
- Example 53. "Basics; Vault;"
- Example 54. "Loop; Nested loops;"
- Example 55. "Math; Arithmetic;"
- Example 56. "Ansible filter; zip;"
- Example 57. "Cache; fact_caching = jsonfile;"
- Example 58. "Module; set_stats; ansible.builtin.set_stats;"
- Example 59. "Jinja filter; random;"
- Example 60. "Utility; jq; Test jq lightweight and flexible command-line JSON processor."
- Example 61. "Basics; MySQL command;"
- Example 62. "Jinja filter; select; match dynamic vars."
- Example 63. "Loop; with_together zip;"
- Example 64. "Vars; group_vars"
- Example 65. "Include; include_role; Galaxy role vbotka.ansible_lib;"
- Example 66. "Include; include_vars; Galaxy role vbotka.ansible_lib;"
- Example 67. "Boolean; and, or, xor;"
- Example 68. "Jinja filter; select; reject;"
- Example 69. "Ansible filter; json_query; json_query filter contains;"
- Example 70. "Basics; Fibonacci;"
- Example 71. "Vars; group_vars;"
- Example 72. "Module; expect; ansible.builtin.expect;"
- Example 73. "Jinja template; set; Set variable in template."
- Example 74. "Jinja filter; escape; Test filter escape."
- Example 75. "Jinja template; template;"
- Example 76. "Ansible filter; password_hash;"
- Example 77. "Module; replace; ansible.builtin.replace;"
- Example 78. "Module; unarchive; ansible.builtin.unarchive;"
- Example 79. "String; testing strings; search; match; regex;"
- Example 80. "Basics; Inventory;"
- Example 81. "Collection; F5 modules;"
- Example 82. "Jinja filter; sort;"
- Example 83. "Delegation; local_action;"
- Example 84. "Module; lineinfile; ansible.builtin.lineinfile;"
- Example 85. "Config; filter_plugins;"
- Example 86. "Inventory; hosts;"
- Example 87. "Basics; async; Asynchronous actions and polling;"
- Example 88. "Jinja filter; groupby; Group a sequence of objects by a common attribute."
- Example 89. "Test; bulk-set task arguments;"
- Example 90. "Module; fail; ansible.builtin.fail;"
- Example 91. "Test; Galaxy role vbotka.linux_lib;"
- Example 92. "Module; dconf; community.general.dconf;"
- Example 93. "Basics; Handlers;"
- Example 94. "Module; copy; ansible.builtin.copy;"
- Example 95. "Loop; with_lines;"
- Example 96. "Conditions; when;"
- Example 97. "Ansible keyword; vars_files;"
- Example 98. "Ansible filter; difference;"
- Example 99. "List; Add item to list;"
- Example 100. "Jinja; white-space control; trim_blocks; lstrip_blocks;"
- Example 101. "Basics; Quotation;"
- Example 102. "Module; ini_file; community.general.ini_file; Workflow."
- Example 103. "Ansible filter; dict2items;"
- Example 104. "Jinja filter; reject; rejectattr;"
- Example 105. "Ansible keyword; become;"
- Example 106. "Lookup; fileglob;"
- Example 107. "Module; yum; ansible.builtin.yum;"
- Example 108. "Module; group_by; ansible.builtin.group_by;"
- Example 109. "Ansible keyword; retries; until;"
- Example 110. "Module; wait_for; ansible.builtin.wait_for;"
- Example 111. "Ansible filter; combine;"
- Example 112. "Ansible filter; union;"
- Example 113. "Special variables; groups;"
- Example 114. "Test; items2dict2; Fork vbotka.ansible.community.general filter items2dict2."
- Example 115. "Config; action_warnings; ANSIBLE_ACTION_WARNINGS;"
- Example 116. "Lookup; env; Read the values of environment variables."
- Example 117. "Python method; index;"
- Example 118. "Jinja function; range;"
- Example 119. "Ansible filter; flatten;"
- Example 120. "Lookup; first_found;"
- Example 121. "Module; package_facts; ansible.builtin.package_facts;"
- Example 122. "Jinja filter; selectattr;"
- Example 123. "Module; blockinfile; ansible.builtin.blockinfile;"
- Example 124. "Module; include_role; import_role; Test include_role, import_role, and tags."
- Example 124. "Basics; Test include_role, import_role, and tags;"
- Example 125. "Inventory; Dynamic inventory;"
- Example 126. "Utility; ansible-runner;"
- Example 127. "Module; stat; ansible.builtin.stat;"
- Example 128. "Module; shell; ansible.builtin.shell; script; ansible.builtin.script;"
- Example 129. "Recursion; Referencing other dict keys in the same parent dict is not supported;"
- Example 130. "Module; file; ansible.builtin.file;"
- Example 131. "Basics; Lazy evaluation;"
- Example 132. "Parameter; limit; Command line option."
- Example 133. "Basics; Workflow;"
- Example 134. "Module; add_host; ansible.builtin.add_host;"
- Example 135. "Ansible filter; regex_replace;"
- Example 136. "Basics; vars;"
- Example 137. "Module; raw; ansible.builtin.raw;"
- Example 138. "Custom filter; dict_flatten; dict_utils;"
- Example 139. "Basics; Expansion of variables;"
- Example 140. "Ansible filter; json_query functions;"
- Example 141. "Basics; Roles;"
- Example 142. "Module; include_vars; ansible.builtin.include_vars;"
- Example 143. "Config; hash_behaviour; ANSIBLE_HASH_BEHAVIOUR;"
- Example 144. "Collection; gcp;"
- Example 145. "Lookup; password;"
- Example 146. "Ansible keyword; block; when;"
- Example 147. "Ansible test; version;"
- Example 148. "Role; Galaxy role vbotka.config_light;"
- Example 149. "Basics; Expansion of expressions;"
- Example 150. "Basics; Callback; Ansible plugins."
- Example 151. "Basics; Boolean;"
- Example 152. "Module; snmp_facts; community.general.snmp_facts;"
- Example 153. "Module; csv; read_csv; community.general.read_csv;"
- Example 154. "Module; meta; ansible.builtin.meta;"
- Example 155. "Config; ansible_python_interpreter; ANSIBLE_PYTHON_INTERPRETER;"
- Example 156. "Ansible filter; product; cartesian;"
- Example 157. "Python method; splitlines;"
- Example 158. "Vars; Scope of variables;"
- Example 159. "Ansible filter; intersect;"
- Example 160. "Ansible test; defined;"
- Example 161. "Ansible keyword; register; Test registered result."
- Example 162. "Jinja filter; join;"
- Example 163. "Custom module; Python subprocess.run; Execute ansible-playbook via Python subprocess.run."
- Example 164. "Parameter; validate;"
- Example 165. "Vars; ansible_facts;"
- Example 166. "Ansible keyword; serial;"
- Example 167. "Module; set_fact; ansible.builtin.set_fact;"
- Example 168. "Module; debug; ansible.builtin.debug;"
- Example 169. "Lookup; dig; community.general.dig;"
- Example 170. "Lookup; with_indexed_items; ansible.builtin.indexed_items;"
- Example 171. "Module; command; ansible.builtin.command;"
- Example 172. "Module; command; shell; ansible.builtin.shell; Test parameters."
- Example 173. "Ansible filter; from_yaml; from_yaml_all; to_yaml;"
- Example 174. "Ansible filter;extract;"
- Example 175. "Special variables; group_names; List of groups the current host is part of."
- Example 176. "Basics; Loop;"
- Example 177. "Vars; facts.d; Add static custom facts by adding static files to facts.d."
- Example 178. "Basics; Roles; vars;"
- Example 179. "Data structure; JSON; YAML;"
- Example 180. "Ansible filter; ternary;"
- Example 181. "Cache; cache plugin; jsonfile cache plugin;"
- Example 182. "Config; CONDITIONAL_BARE_VARS; conditional_bare_variables;"
- Example 183. "Ansible filter; quote;"
- Example 184. "Lookup; pipe;"
- Example 185. "Basics; Testing paths;"
- Example 186. "Delegation; delegate_facts;"
- Example 187. "Handlers; notify;"
- Example 188. "Vars; Substitution;"
- Example 189. "Module; tempfile; ansible.builtin.tempfile;"
- Example 190. "Module; include_tasks; ansible.builtin.include_tasks;"
- Example 191. "Jinja template; if then else;"
- Example 192. "Ansible filter; splitext;"
- Example 193. "Module; mail; community.general.mail;"
- Example 194. "Jinja template; extends;"
- Example 195. "Ansible test; is any; is all;"
- Example 196. "Data structure; YAML; Block Scalar Styles; Chapter 8. Block Styles."
- Example 197. "Ansible filter; hwaddr; ansible.utils.hwaddr; MAC address filter."
- Example 198. "Module; package; ansible.builtin.package;"
- Example 199. "Module; xml; community.general.xml;"
- Example 200. "String; string manipulation;"
- Example 201. "Ansible test; mapping; Test a variable is dictionary."
- Example 202. "Ansible filter; shuffle;"
- Example 203. "Module; fetch; ansible.builtin.fetch; Fetch a file from a remote node."
- Example 204. "Basics; Jinja2;"
- Example 205. "Config; remote_user; ANSIBLE_REMOTE_USER;"
- Example 206. "Ansible test; in;"
- Example 207. "Dictionary; Create, update, combine;"
- Example 208. "Config; colors section; ANSIBLE_COLOR_*;"
- Example 209. "Module; wait_for_connection; ansible.builtin.wait_for_connection;"
- Example 210. "Lookup; file;"
- Example 211. "Jinja filter; unique;"
- Example 212. "Module; setup; ansible.builtin.setup;"
- Example 213. "Parameter; check ansible-playbook parameter, ansible_check_mode;"
- Example 214. "Ansible test; exists; Testing paths. Directory, file, link exists or not."
- Example 215. "Jinja filter; max; min;"
- Example 216. "Vars; hostvars;"
- Example 217. "Ansible filter; strftime; to_datetime; Date, time, datetime."
- Example 218. "Ansible plugins; Connection;"
- Example 219. "Jinja filter; reverse;"
- Example 220. "Loop; loop_control; extended; Extended loop variables;"
- Example 221. "Strategy plugin; host_pinned;"
- Example 222. "Config; ANSIBLE_KEEP_REMOTE_FILES;"
- Example 223. "Config; ANSIBLE_REMOTE_TMP, ANSIBLE_REMOTE_TEMP; remote_tmp; ansible_remote_tmp;"
- Example 224. "Syntax; YAML None; Python null;"
- Example 225. "Basics; Role meta platforms;"
- Example 226. "Module; ping; ansible.builtin.ping; net_ping; ansible.netcommon.net_ping; ios_ping; cisco.ios.ios_ping;"
- Example 227. "Basics; NFS;"
- Example 228. "Module; openssl_; community.crypto.openssl_;"
- Example 229. "Ansible keyword; pre_tasks; post_tasks;"
- Example 230. "Ansible keyword; environment;"
- Example 231. "Module; cron; ansible.builtin.cron; community.general.cronvar;"
- Example 232. "Basics; requirements.yml; Install both roles and collections at the same time with one command."
- Example 233. "Utility; ansible-pull;"
- Example 234. "Utility; passwordstore;"
- Example 235. "Module; slurp; ansible.builtin.slurp;"
- Example 236. "Jinja; Jinja template formatting;"
- Example 237. "Devel; vbotka.ansible.community.general filter any2items;"
- Example 238. "Module; sysctl; ansible.posix.sysctl;"
- Example 239. "Module; assert; ansible.builtin.assert;"
- Example 240. "Jinja function; dict; Create dictionary. Data from hpilo_info."
- Example 241. "Loop; include_tasks; run_once;"
- Example 242. "Module; community.crypto.x509_certificate;"
- Example 243. "Loop; with_items vs. loop;"
- Example 244. "Jinja filter; format;"
- Example 245. "Ansible filter; default; default(); d();"
- Example 246. "String; Concatenate strings;"
- Example 247. "List; Managing lists;"
- Example 248. "Basics; Python;"
- Example 249. "Setup; ansible_mounts; Mount-points returned by setup."
- Example 250. "Callback; log_plays; community.general.log_plays;"
- Example 251. "Python method; split; Parse output."
- Example 252. "Setup; ansible_interfaces; Interfaces returned by setup."
- Example 253. "Basics; Compare dictionaries;"
- Example 254. "Ansible filter; ipaddr; ansible.netcommon.ipaddr;"
- Example 254. "Custom filter; netaddr_iter_iprange;"
- Example 255. "Special variables; ansible_play_hosts_all; ansible_play_hosts; ansible_play_batch;"
- Example 256. "Devel; Custom modules;"
- Example 257. "Ansible filter; default; default(omit);"
- Example 258. "Test; race conditions;"
- Example 259. "Jinja filter; length;"
- Example 260. "Config; DEFAULT_JINJA2_NATIVE;"
- Example 261. "Config; ANSIBLE_CACHE_PLUGIN;"
- Example 262. "Custom filter; combine_lossless;"
- Example 263. "Math; compare integers;"
- Example 264. "Tags; block tags;"
- Example 265. "Jinja; Jinja tests;"
- Example 266. "Role; Role defaults;"
- Example 267. "Ansible filter; json_query; json_query issue to_yaml|from_yaml;"
- Example 268. "Jinja filter; batch;"
- Example 269. "Tags; variable in tags;"
- Example 270. "vbotka.ansible_lib; al_bsd_service_facts; Collect BSD service facts."
- Example 270. "Role; al_bsd_service_facts; Galaxy role vbotka.ansible_lib;"
- Example 271. "Lookup; inventory_hostnames;"
- Example 272. "Basics; truthy; falsy;"
- Example 273. "Module; get_url;"
- Example 274. "Module; cli_parse;"
- Example 275. "Ansible keyword; throttle;"
- Example 276. "Module; Development of a module community.general.ucl"
- Example 277. "Module; lineinfile; Can't modify a line using backrefs or add the line if missing."
- Example 278. "Jinja template; ansible_managed;"
- Example 279. "Devel; Development of a module; Supports_check_mode and changed;"
- Example 280. "Lookup; to_paths; ansible.utils.to_paths; Flatten object into a dictionary of paths and values"
- Example 281. "Ansible filter; community.general.dict_kv;"
- Example 282. "Ansible filter; community.general.groupby_as_dict;"
- Example 283. "Ansible filter; community.general.version_sort;"
- Example 284. "Ansible filter; community.general.jc;"
- Example 285. "Ansible filter; community.general.path_join;"
- Example 286. "Ansible filter; community.general.lists_mergeby;"
- Example 287. "Devel; Job management (async, async_status, kill, logger, cache);"
- Example 288. "Module; meta; flush_handlers;"
- Example 289. "Ansible filter; ansible.utils.keep_keys; ansible.utils.remove_keys; ansible.utils.replace_keys;"
- Example 290. "Ansible filter; json_query function merge; JmesPath support of 'spread' operator."
- Example 291. "Devel; filter_core; Test integration target of forked github.com/ansible/ansible."
- Example 292. "Custom filter; mac-vendor-lookup;"
- Example 293. "Role; CIS role UBUNTU20-CIS; Configure Ubuntu 20 machine to be CIS v2.1.0 compliant."
- Example 293. "Devel; Role UBUNTU20-CIS; Execute development branches and integrations tests of a forked role."
- Example 294. "Test; string; iterable; sequence; mapping; boolean; Test type of variable."
- Example 295. "Jinja; loop.index; Test index in nested Jinja loops."
Update README.md
To update README.md file go to the directory doc.
- Update the file list_of_examples.yml if you want to update the list of examples in the contents and tags in the index. The structure of a line in this file is follows. If the example belongs to more categories add more lines wiht he same number of the example. The comment is optional.
- Number_of_the_example. "Category; tag; tag; ... tag; Comment."
-
Update the template templates/README.md.j2 if you want to update the text.
-
Just type make to update README.md
shell> ./make