diff --git a/prak/pr03/README.adoc b/prak/pr03/README.adoc new file mode 100644 index 0000000000000000000000000000000000000000..e559d36c21ba8fbbe49be2934789af098b204893 --- /dev/null +++ b/prak/pr03/README.adoc @@ -0,0 +1,67 @@ += Praktikumsblatt 3 - Heimlabor + +== *Aufgabe 1* + +[loweralpha] + +. Installieren Sie auf Ihrem Linux-Desktop-System das Provisioning-Tool Ansible in der Version 2.10.8 oder höher. Überprüfen Sie Ihre Installation mit dem Kommando ansible --version + ++ +[source] +-- +ansible 2.10.8 + config file = None + configured module search path = ['/home/fabiola/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] + ansible python module location = /usr/lib/python3/dist-packages/ansible + executable location = /usr/bin/ansible + python version = 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] +-- ++ + +. Pingen Sie mit einem möglichst einfachen Ansible-Kommando Ihren lokalen Rechner an. +* Notieren Sie das von Ihnen verwendete Ansible-Kommando. ++ +[source] +-- + ansible -m ping localhost +-- ++ +* Was genau passiert bei der Ausführung dieses Kommandos? Was prüft dieses Kommando? ++ +[source] +-- + [WARNING]: No inventory was parsed, only implicit localhost is available +localhost | SUCCESS => { + "changed": false, + "ping": "pong" +} + +-- ++ + +*ping* - Versucht, eine Verbindung zum Host herzustellen, prüft ein funktionsfähiges Python und gibt bei Erfolg *pong* zurück. + +* Funktioniert dieses Kommando auch für Ihren Remote-Server serv-ws22, indem Sie localhost durch die IPv6-Adresse von serv-ws22 ersetzen? ++ +[source] +-- +[WARNING]: No inventory was parsed, only implicit localhost is available +[WARNING]: provided hosts list is empty, only localhost is available. Note that +the implicit localhost does not match 'all' +[WARNING]: Could not match supplied host pattern, ignoring: +2001:638:408:200:FF3C::1 +-- ++ +Nein, das Kommando funktioniert nicht für den Remote-Server serv-ss22 + +* Interpretieren Sie die Fehlermeldung: +** Ansible interpretiert "localhost" nicht als Adresse, sondern als Ansible hostname. + +. Legen Sie in Ihrem GIT-Projekt servmgmt-ws22 ein Unterverzeichnis ansible an, das Ihren gesamten Ansible-Code enthält. Erstellen Sie dort in YAML eine Inventory-Datei hosts.yml, die den lokalen Rechner (Linux-Desktop-System) und Ihren Remote-Server serv-ws22 enthält. Gehen Sie in das Verzeichnis ansible und lassen Sie dann ein Ansible-Ping gegen Ihren Server serv-ws22 laufen. Wie lautet Ihr Kommando? + ++ +[source] +-- + ansible -m ping localhost +-- ++ \ No newline at end of file