You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-4Lines changed: 52 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2109,6 +2109,11 @@ Ansible is:
2109
2109
* Agent-less
2110
2110
* Minimal run requirements (Python & SSH) and simple to use
2111
2111
* Default mode is "push" (it supports also pull)
2112
+
* Focus on simpleness and ease-of-use
2113
+
</b></details>
2114
+
2115
+
<details>
2116
+
<summary>What kind of automation you wouldn't do with Ansible and why?</summary><br><b>
2112
2117
</b></details>
2113
2118
2114
2119
<details>
@@ -2118,6 +2123,7 @@ An inventory file defines hosts and/or groups of hosts on which Ansible tasks ex
2118
2123
2119
2124
An example of inventory file:
2120
2125
2126
+
```
2121
2127
192.168.1.2
2122
2128
192.168.1.3
2123
2129
192.168.1.4
@@ -2126,6 +2132,7 @@ An example of inventory file:
2126
2132
190.40.2.20
2127
2133
190.40.2.21
2128
2134
190.40.2.22
2135
+
```
2129
2136
</b></details>
2130
2137
2131
2138
<details>
@@ -2138,7 +2145,10 @@ spun up and shut down, without you tracking every change in these sources.
2138
2145
</b></details>
2139
2146
2140
2147
<details>
2141
-
<summary>You want to run Ansible playbook only on specific minor version of your OS, how would you achieve that?</summary><br><b>
2148
+
<summary>How do you list all modules and how can you see details on a specific module?</summary><br><br>
2149
+
2150
+
1. Ansible online docs
2151
+
2.`ansible-doc -l` for list of modules and `ansible [module_name]` for detailed information on a specific module
2142
2152
</b></details>
2143
2153
2144
2154
<details>
@@ -2147,11 +2157,15 @@ spun up and shut down, without you tracking every change in these sources.
2147
2157
```
2148
2158
- name: Create a new directory
2149
2159
file:
2150
-
path: "/tmp/new_directory"
2151
-
state: directory
2160
+
path: "/tmp/new_directory"
2161
+
state: directory
2152
2162
```
2153
2163
</b></details>
2154
2164
2165
+
<details>
2166
+
<summary>You want to run Ansible playbook only on specific minor version of your OS, how would you achieve that?</summary><br><b>
2167
+
</b></details>
2168
+
2155
2169
<details>
2156
2170
<summary>What would be the result of the following play?</summary><br><b>
2157
2171
@@ -2169,10 +2183,28 @@ spun up and shut down, without you tracking every change in these sources.
2169
2183
When given a written code, always inspect it thoroughly. If your answer is “this will fail” then you are right. We are using a fact (ansible_hostname), which is a gathered piece of information from the host we are running on. But in this case, we disabled facts gathering (gather_facts: no) so the variable would be undefined which will result in failure.
2170
2184
</b></details>
2171
2185
2186
+
<details>
2187
+
<summary>What would be the result of running the following task?
2188
+
2189
+
```
2190
+
- hosts: localhost
2191
+
tasks:
2192
+
- name: Install zlib
2193
+
package:
2194
+
name: zlib
2195
+
state: present
2196
+
```
2197
+
</summary><br><b>
2198
+
</b></details>
2199
+
2172
2200
<details>
2173
2201
<summary>Which Ansible best practices are you familiar with?. Name at least three</summary><br><b>
2174
2202
</b></details>
2175
2203
2204
+
<details>
2205
+
<summary>Explain the directory layout of an Ansible role</summary><br><b>
2206
+
</b></details>
2207
+
2176
2208
<details>
2177
2209
<summary>Write a playbook to install ‘zlib’ and ‘vim’ on all hosts if the file ‘/tmp/mario’ exists on the system.</summary><br><b>
2178
2210
@@ -2263,7 +2295,19 @@ A full list can be found at the link above. Also, note there is a significant di
2263
2295
</b></details>
2264
2296
2265
2297
<details>
2266
-
<summary>What is ansible-pull? How it’s different compared to ansible-playbook?</summary><br><b>
2298
+
<summary>What is ansible-pull? How is it different from how ansible-playbook works?</summary><br><b>
2299
+
</b></details>
2300
+
2301
+
<details>
2302
+
<summary>What is Ansible Vault?</summary><br><b>
2303
+
</b></details>
2304
+
2305
+
<details>
2306
+
<summary>Demonstrate each of the following with Ansible:
2307
+
2308
+
* Conditionals
2309
+
* Loops
2310
+
</summary><br><b>
2267
2311
</b></details>
2268
2312
2269
2313
<aname="ansible-advanced"></a>
@@ -2282,6 +2326,10 @@ def cap(self, string):
2282
2326
</code>
2283
2327
</b></details>
2284
2328
2329
+
<details>
2330
+
<summary>You would like to run a task only if previous task changed anything. How would you achieve that?</summary><br><b>
2331
+
</b></details>
2332
+
2285
2333
<details>
2286
2334
<summary>How do you test your Ansible based projects?</summary><br><b>
0 commit comments