add homework 8.1, task 1 and partial task 2

This commit is contained in:
2022-07-13 10:36:57 +07:00
parent f297e4a942
commit 15e64885aa
9 changed files with 217 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
docker run --rm -d --name=centos7 centos:7 tail -f /dev/null \
&& docker run --rm -d --name=debian debian:stable-slim tail -f /dev/null

View File

@@ -0,0 +1,2 @@
---
some_fact: "all default fact"

View File

@@ -0,0 +1,2 @@
---
some_fact: "deb default fact"

View File

@@ -0,0 +1,2 @@
---
some_fact: "el default fact"

View File

@@ -0,0 +1,9 @@
---
el:
hosts:
centos7:
ansible_connection: docker
deb:
hosts:
debian:
ansible_connection: docker

View File

@@ -0,0 +1,5 @@
---
inside:
hosts:
localhost:
ansible_connection: local

View File

@@ -0,0 +1,10 @@
---
- name: Print os facts
hosts: all
tasks:
- name: Print OS
debug:
msg: "{{ ansible_distribution }}"
- name: Print fact
debug:
msg: "{{ some_fact }}"