-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
39 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
ansible/AnsibleEnv.dockerfile → topic/ansible/AnsibleEnv.dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y software-properties-common && \ | ||
apt-add-repository --yes --update ppa:ansible/ansible && \ | ||
apt-get install -y ansible | ||
CMD ["/bin/bash"] | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y software-properties-common && \ | ||
apt-add-repository --yes --update ppa:ansible/ansible && \ | ||
apt-get install -y ansible | ||
CMD ["/bin/bash"] |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Initialize Ansible learning place | ||
## Install ansible: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html | ||
# Initialize Ansible learning place | ||
## Install ansible: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html |
34 changes: 17 additions & 17 deletions
34
ansible/basic/check-stats.yaml → topic/ansible/basic/check-stats.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
- name: Check CPU and RAM usage | ||
hosts: localhost | ||
gather_facts: yes | ||
tasks: | ||
- name: Get system stats | ||
stat: | ||
path: "/proc/{{ item }}/" | ||
loop: | ||
- "cpuinfo" | ||
- "meminfo" | ||
|
||
- name: Print system stats | ||
debug: | ||
var: item.stat.content | ||
with_items: "{{ ansible_loop }}" | ||
when: item.stat.exists | ||
--- | ||
- name: Check CPU and RAM usage | ||
hosts: localhost | ||
gather_facts: yes | ||
tasks: | ||
- name: Get system stats | ||
stat: | ||
path: "/proc/{{ item }}/" | ||
loop: | ||
- "cpuinfo" | ||
- "meminfo" | ||
|
||
- name: Print system stats | ||
debug: | ||
var: item.stat.content | ||
with_items: "{{ ansible_loop }}" | ||
when: item.stat.exists |
16 changes: 8 additions & 8 deletions
16
ansible/basic/ping-google.yaml → topic/ansible/basic/ping-google.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
- name: Ping google.com | ||
hosts: localhost | ||
gather_facts: no | ||
tasks: | ||
- name: Ping google.com | ||
ping: | ||
data: "google.com" | ||
--- | ||
- name: Ping google.com | ||
hosts: localhost | ||
gather_facts: no | ||
tasks: | ||
- name: Ping google.com | ||
ping: | ||
data: "google.com" |