mirror of
https://github.com/Dannecron/netology-devops.git
synced 2025-12-25 23:32:37 +03:00
add homework 8.1, task 1 and partial task 2
This commit is contained in:
2
src/homework/08-ansible/8.1/playbook/docker_run.sh
Executable file
2
src/homework/08-ansible/8.1/playbook/docker_run.sh
Executable 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
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
some_fact: "all default fact"
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
some_fact: "deb default fact"
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
some_fact: "el default fact"
|
||||
9
src/homework/08-ansible/8.1/playbook/inventory/prod.yml
Normal file
9
src/homework/08-ansible/8.1/playbook/inventory/prod.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
el:
|
||||
hosts:
|
||||
centos7:
|
||||
ansible_connection: docker
|
||||
deb:
|
||||
hosts:
|
||||
debian:
|
||||
ansible_connection: docker
|
||||
5
src/homework/08-ansible/8.1/playbook/inventory/test.yml
Normal file
5
src/homework/08-ansible/8.1/playbook/inventory/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
inside:
|
||||
hosts:
|
||||
localhost:
|
||||
ansible_connection: local
|
||||
10
src/homework/08-ansible/8.1/playbook/site.yml
Normal file
10
src/homework/08-ansible/8.1/playbook/site.yml
Normal 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 }}"
|
||||
Reference in New Issue
Block a user