Rename exercises dir

Name it instead "topics" so it won't be
strange if some topics included "exercises" directory.
This commit is contained in:
abregman
2022-08-02 01:51:39 +03:00
parent ea1d94d67b
commit 99c4e02ecf
235 changed files with 283 additions and 74 deletions

View File

@@ -0,0 +1,28 @@
## My first playbook - Solution
1. `vi first_playbook.yml`
```
- name: Install zlib and create a file
hosts: some_remote_host
tasks:
- name: Install zlib
package:
name: zlib
state: present
become: yes
- name: Create the file /tmp/some_file
path: '/tmp/some_file'
state: touch
```
2. First, edit the inventory file: `vi /etc/ansible/hosts`
```
[some_remote_host]
some.remoted.host.com
```
Run the playbook
`ansible-playbook first_playbook.yml`

View File

@@ -0,0 +1,8 @@
## My First Task - Solution
```
- name: Create a new directory
file:
path: "/tmp/new_directory"
state: directory
```

View File

@@ -0,0 +1,9 @@
## Update and Upgrade apt packages task - Solution
```
- name: "update and upgrade apt packages."
become: yes
apt:
upgrade: yes
update_cache: yes
```