Giter Site home page Giter Site logo

Comments (9)

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024
  • Package Management: ntpd installieren
  • Service: ntpd stoppen, starten, Status prüfen

from ansible-workshop-clt-2018.

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024

Übung 03

Ad-Hoc Befehle auf der Maschine ausführen

Details

Manche Befehle muss man nur einmal auf einem Host ausführen, und benötigt dafür kein Playbook. Zu diesem Zweck werden wir in dieser Übung die folgenden Schritte durchführen:

  • Uptime des Hosts herausfinden
  • Hostname des Hosts herausfinden
  • Betriebssystem des Hosts (Linux) herausfinden
  • NTP installieren

Durchführung

ansible all --inventory-file=hosts.cfg -m shell -a "uptime"
ansible all --inventory-file=hosts.cfg -m shell -a "hostname"
ansible all --inventory-file=hosts.cfg -m shell -a "lsb_release -a"

gewünschtes Ergebnis

Abhängig vom jeweiligen Befehl sollte das Ergebnis in etwa wie folgt aussehen:

  • uptime:
hostname123 | SUCCESS | rc=0 >>
 14:07:07 up 2 days, 57 min,  1 user,  load average: 0,02, 0,08, 0,08
  • hostname:
hostname123 | SUCCESS | rc=0 >>
hostname123

  • lsb_release -a:
hostname123 | SUCCESS | rc=0 >>
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:        17.10
Codename:       artfulNo LSB modules are available.

from ansible-workshop-clt-2018.

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024

Übung steht so weit, aber muss ev. noch für --become angepasst werden.

from ansible-workshop-clt-2018.

AndreasUfert avatar AndreasUfert commented on August 24, 2024

Wir müssen heute abend nochmal über ansible.cfg, inventory und keyfile nachdenken. Das muss von $(pwd) unabhängig sein und wenn es nicht in $HOME liegen soll, müssen wir mindestens noch eine Variable setzen. Ich hab zwei Threads gefunden, die nahelegen, dass sich da mit 2.4 etwas geändert hat und wir sollten das in verschiedenen Umgebungen ausprobieren.

from ansible-workshop-clt-2018.

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024

Habe gesehen dass du die Übung aktualisiert hast. Wenn du mir das nächste Mal neue Configs bereitstellst, dann teste ich das noch mal. Schaut aber soweit gut aus.

from ansible-workshop-clt-2018.

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024

In den Slides zu erwähnende Punkte:

  • "ansible all"
  • -m
  • -a "parameter"
  • -b
  • Idempotenz bei Verwendung von "-m apt"

from ansible-workshop-clt-2018.

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024

Übung funktioniert soweit, fehlt nur noch Dokumentation in den Slides.

from ansible-workshop-clt-2018.

qbi avatar qbi commented on August 24, 2024

In Folie 23 sind die Punkte aus #5 (comment) angesprochen. Reicht dir das? Was muss da ggf. noch mehr hin?

from ansible-workshop-clt-2018.

andreasscherbaum avatar andreasscherbaum commented on August 24, 2024

Ich denke dass das reicht.

from ansible-workshop-clt-2018.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.