Various examples of Ansbile code.
- Example 1. Iterate dictionary in template
- Example 2. json_query basics
- Example 3. Iterate dictionary in play
- Example 4. trim filter
- Example 5. async_status
- Example 6. with_sequence, loop_control and index_var
- Example 7. synchronize module
- Example 8. loop include_tasks
- Example 9. gather_facts, service_facts
- Example 10. Jinja math
- Example 11. Test user module with Ansible 2.6.1 and FreeBSD 11.2
- Example 12. Select items from dictionary
- Example 13. Test indentation of a block
- Example 14. loop include_tasks and delegate_to
- Example 15. import_playbook
- Example 16. map filter
- Example 17. Print magic variables
- Example 18. include_role
- Example 19. import_playbook and tags
- Example 20. json_query
- Example 21. split function
- Example 22. Dynamic vars with set_fact
- Example 23. Test names in a block
- Example 24. include_role and include_vars
- Example 25. parted (Linux only)
- Example 26. from_yaml to_nice_json (netplan conf)
- Example 27. ansible-invetory utility
- Example 28. host_vars
- Example 29. Invalid deprecation warning message with certain types of syntax errors
- Example 30. Test command argv form in 2.6
- Example 31. Debug tools
- Example 32. Filters
- Example 33. Precedence of the variables
- Example 34. Passwords
- Example 35. command creates
- Example 36. vars_prompt, pause
- Example 37. find module
- Example 38. Strings and Lists
- Example 39. lookup
- Example 40. subelements
- Example 41. map
- Example 42. ZFS
- Example 43. json_query filter contains
- Example 44. Xen
- Example 45. Iterate blockinfile from templates
- Example 46. run_once
- Example 47. Run the playbook only on one host per group
- Example 48. getent module
- Example 49. Variable precedence complex
- Example 50. Share variables between playbooks
- Example 51. uri module. Ansible Galaxy API list platforms
- Example 52. block rescue always
- Example 53. Vault
- Example 54. Nested loops
- Example 55. Arithmetics Math
- Example 56. zip filter
- Example 57. cache facts
- Example 58. set_stats
- Example 59. random filter
- Example 60. Test jq lightweight and flexible command-line JSON processor
- Example 61. MySQL command
- Example 62. select match dynamic vars
- Example 63. with_together, zip
- Example 64. group_vars
- Example 65. include_role (vbotka.ansible_lib)
- Example 66. include_vars (vbotka.ansible_lib)
- Example 67. Boolean and, or, xor
- Example 68. select
- Example 69. json_query contains
- Example 70. Fibonacci
- Example 71. group_vars
- Example 72. expect
- Example 73. Jinja set_fact
- Example 74. Test escape
- Example 75. template
- Example 76. password_hash
- Example 77. replace
- Example 78. unarchive
- Example 79. search, match, regex
- Example 80. inventory
- Example 81. F5 modules
- Example 82. sort
- Example 83. local_action
- Example 84. lineinfile
- Example 85. filter_plugins
- Example 86. hosts
- Example 87. aysnc
- Example 88. groupby. Group a sequence of objects by a common attribute.
- Example 89. bulk-set task arguments
- Example 90. fail module
- Example 91. Test vbotka.linux_lib
- Example 92. dconf
- Example 93. handlers
- Example 94. copy
- Example 95. with_lines
- Example 96. when
- Example 97. vars_files
- Example 98. difference
- Example 99. add item to list
- Example 100. Jinja2 whitespace control (trim_blocks, lstrip_blocks)
- Example 101. Quotation
- Example 102. ini_file, workflow
- Example 103. dict2items
- Example 104. reject, rejectattr
- Example 105. become
- Example 106. fileglob
- Example 107. yum
- Example 108. group_by
- Example 109. retries until
- Example 110. wait_for
- Example 111. combine
- Example 112. union
- Example 113. groups
- Example 114. items2dict
- Example 115. action_warnings
- Example 116. env - read the value of environment variables
- Example 117. index
- Example 118. range
- Example 119. flatten
- Example 120. first_found
- Example 121. package_facts
- Example 122. selectattr
- Example 123. blockinfile
- Example 124. include_role, import_role and tags
- Example 125. Dynamic inventory
- Example 126. ansible-runner
- Example 127. stat
- Example 128. shell, script
- Example 129. recursion
- Example 130. file module
- Example 131. Lazy evaluation
- Example 132. limit (command line option)
- Example 133. Workflow
- Example 134. add_host
- Example 135. regex_replace
- Example 136. vars
- Example 137. raw
- Example 138. dict_flatten (filter_plugins/dict_utils)
- Example 139. expansion
- Example 140. json_query functions
- Example 141. roles
- Example 142. include_vars
- Example 143. hash_behaviour
- Example 144. gcp
- Example 145. password
- Example 146. block when
- Example 147. version test
- Example 148. Role vbotka.config_light
- Example 149. Expansion of expressions
- Example 150. Plugins callback
- Example 151. Boolean
- Example 152. snmp_facts
- Example 153. csv
- Example 154. meta
- Example 155. ansible_python_interpreter
- Example 156. product, cartesian
- Example 157. splitlines
- Example 158. scope of variables
- Example 159. intersect
- Example 160. defined
- Example 161. Test registered result
- Example 162. join
- Example 163. Execute ansible-playbook via Python subprocess.run
- Example 164. validate
- Example 165. ansible_facts
- Example 166. serial
- Example 167. set_fact
- Example 168. debug
- Example 169. dig
- Example 170. with_indexed_items
- Example 171. command
- Example 172. command, shell test parameters
- Example 173. from_yaml from_yaml_all to_yaml
- Example 174. extract
- Example 175. group_names
- Example 176. loop
- Example 177. facts.d
- Example 178. role/vars
- Example 179. JSON YAML data
- Example 180. ternary
- Example 181. jsonfile cache plugin
- Example 182. CONDITIONAL_BARE_VARS conditional_bare_variables
- Example 183. quote filter
- Example 184. pipe plugin
- Example 185. Testing paths
- Example 186. delegate_facts
- Example 187. notify
- Example 188. substitution
- Example 189. tempfile
- Example 190. include_tasks
- Example 191. if then else
- Example 192. splitext
- Example 193. mail
- Example 194. extends (Jinja2)
- Example 195. is any, is all
- Example 196. Block Scalar Styles (Chapter 8. Block Styles)
- Example 197. hwaddr
- Example 198. package module
- Example 199. xml
- Example 200. string manipulation
- Example 201. mapping test variable is a dictionary
- Example 202. shuffle
- Example 203. fetch – Fetches a file from remote nodes
- Example 204. Jinja2
- Example 205. remote_user
- Example 206. Test in
- Example 207. dict Create dictionary
- Example 208. colors
- Example 209. wait_for_connection
- Example 210. file lookup plugin
- Example 211. unique filter
- Example 212. setup module
- Example 213. ansible-playbook --check ansible_check_mode
- Example 214. Testing paths. is directory file link exists same_file mount
- Example 215. max, min filters
- Example 216. hostvars
- Example 217. date, time, datetime
- Example 218. connection
- Example 219. reverse filter
- Example 220. Extended loop variables
- Example 221. host_pinned strategy
- Example 222. ANSIBLE_KEEP_REMOTE_FILES
- Example 223. ANSIBLE_REMOTE_TMP, ANSIBLE_REMOTE_TEMP, remote_tmp, ansible_remote_tmp
- Example 224. YAML None, Python null
- Example 225. Role meta platforms
- Example 226. module ping, net_ping, ios_ping
- Example 227. NFS
- Example 228. openssl_*
- Example 229. pre_tasks post_tasks
- Example 230. environment (play keyword)
- Example 231. cron
- Example 232. requirements.yml
- Example 233. ansible-pull
- Example 234. passwordstore
- Example 235. slurp
- Example 236. Jinja template formatting
- Example 237. Integration tests vbotka.ansible.community.general
- Example 238. sysctl
- Example 239. assert
- Example 240. hpilo_info
- Example 241. loop include_tasks and run_once
- Example 242. community.crypto.x509_certificate
- Example 243. with_items vs. loop
- Example 244. format
- Example 245. default(), d()
- Example 246. Concatenate strings
- Example 247. Managing lists
- Example 248. Python
- Example 249. ansible_mounts
- Example 250. callback log_plays
- Example 251. parse output
- Example 252. ansible_interfaces
- Example 253. compare dictionaries
- Example 254. ipaddr, netaddr
- Example 255. Special vars ansible_play_hosts_all, ansible_play_hosts, ansible_play_batch
- Example 256. Custom modules
- Example 257. default(omit)
- Example 258. race conditions
- Example 259. length
- Example 260. DEFAULT_JINJA2_NATIVE
- Example 261. ANSIBLE_CACHE_PLUGIN
- Example 262. combine_lossless custom filter
- Example 263. compare integers
- Example 264. block tags
- Example 265. Jinja tests
- Example 266. Role defaults
- Example 267. json_query issue to_yaml|from_yaml
- Example 268. batch filter
- Example 269. variable in tags
- Example 270. al_bsd_service_facts (vbotka.ansible_lib)
- Example 271. inventory_hostnames
- Example 272. truthy, falsy
- Example 273. get_url
- Example 274. cli_parse
- Example 275. throttle
- Example 276. Development of a module (community.general.ucl)
- Example 277. lineinfile can't modify a line using backrefs or add the line if missing
- Example 278. ansible_managed
- Example 279. Development of a module (supports_check_mode and changed)
- Example 280. ansible.utils.to_paths – Flatten object into a dictionary of paths and values