22
33:information_source :   ; This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :)
44
5- :bar_chart :   ; There are currently ** 834 ** questions
5+ :bar_chart :   ; There are currently ** 854 ** questions
66
77:warning :   ; You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [ Q&A] ( common-qa.md ) for more details
88
6060 <tr >
6161 <td align="center"><a href="#testing"><img src="images/testing.png" width="75px;" height="75px;" alt="Testing"/><br /><b>Testing</b></a></td>
6262 <td align="center"><a href="#databases"><img src="images/databases.png" width="75px;" height="75px;" alt="Databases"/><br /><b>Databases</b></a></td>
63+ <td align="center"><a href="#regex"><b>Regex</b></a><br /><sub><a href="#regex-beginner">Beginner :baby:</a></sub><br><sub></td>
6364 <td align="center"><a href="#design"><img src="images/design.png" width="110px;" height="75px;" alt="Design"/><br /><b>Design</b></a></td>
6465 <td align="center"><a href="#questions-you-ask"><img src="images/you.png" width="110px;" height="75px;" alt="you"/><br /><b>Questions you ask</b></a></td>
6566 <td align="center"><a href="#exercises"><img src="images/exercises.png" width="110px;" height="75px;" alt="Exercises"/><br /><b>Exercises</b></a></td>
@@ -2166,6 +2167,14 @@ spun up and shut down, without you tracking every change in these sources.
21662167<summary >You want to run Ansible playbook only on specific minor version of your OS, how would you achieve that?</summary ><br ><b >
21672168</b ></details >
21682169
2170+ <details >
2171+ <summary >What the "become" directive used for in Ansible?</summary ><br ><b >
2172+ </b ></details >
2173+
2174+ <details >
2175+ <summary >What are facts? How to see all the facts of a certain host?</summary ><br ><b >
2176+ </b ></details >
2177+
21692178<details >
21702179<summary >What would be the result of the following play?</summary ><br ><b >
21712180
@@ -2184,7 +2193,7 @@ When given a written code, always inspect it thoroughly. If your answer is “th
21842193</b ></details >
21852194
21862195<details >
2187- <summary >What would be the result of running the following task?
2196+ <summary >What would be the result of running the following task? How to fix it?
21882197
21892198```
21902199- hosts: localhost
@@ -2205,6 +2214,18 @@ When given a written code, always inspect it thoroughly. If your answer is “th
22052214<summary >Explain the directory layout of an Ansible role</summary ><br ><b >
22062215</b ></details >
22072216
2217+ <details >
2218+ <summary >What 'blocks' are used for in Ansible?</summary ><br ><b >
2219+ </b ></details >
2220+
2221+ <details >
2222+ <summary >How do you handle errors in Ansible?</summary ><br ><b >
2223+ </b ></details >
2224+
2225+ <details >
2226+ <summary >You would like to run a certain command if a task fails. How would you achieve that?</summary ><br ><b >
2227+ </b ></details >
2228+
22082229<details >
22092230<summary >Write a playbook to install ‘zlib’ and ‘vim’ on all hosts if the file ‘/tmp/mario’ exists on the system.</summary ><br ><b >
22102231
@@ -2320,10 +2341,10 @@ A full list can be found at the link above. Also, note there is a significant di
23202341<details >
23212342<summary >Write a filter to capitalize a string</summary ><br ><b >
23222343
2323- < code >
2344+ ```
23242345def cap(self, string):
23252346 return string.capitalize()
2326- </ code >
2347+ ```
23272348</b ></details >
23282349
23292350<details >
@@ -3616,7 +3637,7 @@ with open('file.txt', 'w') as file:
36163637<summary >Can you write a function which will print all the file in a given directory? including sub-directories</summary ><br ><b >
36173638</b ></details >
36183639
3619- #### Regex
3640+ #### Python Regex
36203641
36213642<details >
36223643<summary >How do you perform regular expressions related operations in Python? (match patterns, substitute strings, etc.)</summary ><br ><b >
@@ -6280,6 +6301,44 @@ A single data source (at least usually) which is stored in a raw format.
62806301<summary >What is OLAP (Online Analytical Processing)?</summary ><br ><b >
62816302</b ></details >
62826303
6304+ ## Regex
6305+
6306+ Given a text file, perform the following exercises
6307+
6308+ #### Extract
6309+
6310+ <details >
6311+ <summary >Extract all the numbers</summary ><br ><b >
6312+ </b ></details >
6313+
6314+ <details >
6315+ <summary >Extract the first word of each line</summary ><br ><b >
6316+
6317+ Bonus: extract the last word of each line
6318+ </b ></details >
6319+
6320+ <details >
6321+ <summary >Extract all the IP addresses</summary ><br ><b >
6322+ </b ></details >
6323+
6324+ <details >
6325+ <summary >Extract dates in the format of yyyy-mm-dd or yyyy-dd-mm</summary ><br ><b >
6326+ </b ></details >
6327+
6328+ <details >
6329+ <summary >Extract email addresses</summary ><br ><b >
6330+ </b ></details >
6331+
6332+ #### Replace
6333+
6334+ <details >
6335+ <summary >Replace tabs with four spaces</summary ><br ><b >
6336+ </b ></details >
6337+
6338+ <details >
6339+ <summary >Replace 'red' with 'green'</summary ><br ><b >
6340+ </b ></details >
6341+
62836342## Design
62846343
62856344#### Architecture
0 commit comments