redhat:other-redhat:ansible:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
redhat:other-redhat:ansible:start [2017/08/10 14:46] – [Playbooks] michaelredhat:other-redhat:ansible:start [2020/05/13 15:01] (current) – [Next, we have a set of tasks:] michael
Line 18: Line 18:
 <WRAP left round info 100%> <WRAP left round info 100%>
 **Weitere nützliche Informationen:** **Weitere nützliche Informationen:**
-  * [[https://sysadmincasts.com/episodes/43-19-minutes-with-ansible-part-1-4|Das Ansible Funktionsprinzip anhand eines Videos und Grafiken erklärt.]]+  * **''[[https://sysadmincasts.com/episodes/43-19-minutes-with-ansible-part-1-4|Das Ansible Funktionsprinzip anhand eines Videos und Grafiken erklärt.]]''**
 </WRAP> </WRAP>
  
  
 +----
 +
 +====== Erste Schritte mit Ansible ======
 +
 +<WRAP center box 100%>
 ===== Installation auf CentOS / RHEL7 ===== ===== Installation auf CentOS / RHEL7 =====
 Installiert, wird Ansible anschliessend mit einem ganz einfachen yum install auftruf; Da die benötigten RPMs über das EPEL 6, 7, repositorie verfügbar sind. -> ([[redhat:base-redhat:repositories-redhat|EPEL Repository konfigurieren.]]) Installiert, wird Ansible anschliessend mit einem ganz einfachen yum install auftruf; Da die benötigten RPMs über das EPEL 6, 7, repositorie verfügbar sind. -> ([[redhat:base-redhat:repositories-redhat|EPEL Repository konfigurieren.]])
Line 28: Line 33:
 # yum install ansible # yum install ansible
 </code> </code>
 +</WRAP>
  
----- 
  
-====== Erste Schritte mit Ansible ====== +In den ersten Schritten, wird Ansible grundlegend Konfiguriert und erste Test-Kommandos abgesetzt!  
-In den ersten Schritten, wird Ansible grundlegend Konfiguriert und erste Test-Kommandos abgesetzt! <wrap em>Wichtig:</wrap> Damit Ansible bei vorkonfigurierter SSH-Key-Authentifizierung richtig funktionieren kann, muss eine **SSH Verbindung** vom Ansibe-Host zu allen anzusprechenden Servern ohne Passwort möglich sein! Darum ist es zwingend, dass wir: <WRAP clear/>+ 
 +<wrap em>Wichtig:</wrap> Damit Ansible bei vorkonfigurierter SSH-Key-Authentifizierung richtig funktionieren kann, muss eine **SSH Verbindung** vom Ansibe-Host zu allen anzusprechenden Servern ohne Passwort möglich sein! Darum ist es zwingend, dass wir: <WRAP clear/>
  ''**(Unter 'Key Auth.' in 'Putty Einstellungen' --> <wrap em>Agent-Forewarding aktivieren!</wrap>)**''  ''**(Unter 'Key Auth.' in 'Putty Einstellungen' --> <wrap em>Agent-Forewarding aktivieren!</wrap>)**''
  
Line 111: Line 117:
 Falls überprüft werden soll, ob man auf den geplanten Zielsystemen auch wirklich root-Zugriffe hat; kann man dies mit folgendem Befehl überprüfen: Falls überprüft werden soll, ob man auf den geplanten Zielsystemen auch wirklich root-Zugriffe hat; kann man dies mit folgendem Befehl überprüfen:
  
-<WRAP center round box 100%>+<WRAP center box 100%>
 <code> <code>
 [rebermi@vstif2 ~]$ ansible all -s -m shell -a id [rebermi@vstif2 ~]$ ansible all -s -m shell -a id
Line 288: Line 294:
 </code> </code>
  
-This module allows us to specify a package and the state that it should be in, which is "installed" in our case. The ''update-cache=true'' part tells our remote machine to update its package cache //(apt-get update)// prior to installing the software.+This module allows us to specify a package and the state that it should be in, which is "installed" in our case. The ''update_cache=true'' part tells our remote machine to update its package cache //(apt-get update)// prior to installing the software.
  
 The "**notify**" item contains a list with one item, which is called "start nginx". This is not an internal Ansible command, it is a reference to a handler, which can perform certain functions when it is called from within a task. //We will define the "start nginx" handler below.// The "**notify**" item contains a list with one item, which is called "start nginx". This is not an internal Ansible command, it is a reference to a handler, which can perform certain functions when it is called from within a task. //We will define the "start nginx" handler below.//
Line 790: Line 796:
 <WRAP center round download 100%> <WRAP center round download 100%>
 ==== Fertige Playbooks zum Download ==== ==== Fertige Playbooks zum Download ====
-Unter dem unten aufgeführten Link, werden von Ansible unteranderem bereits fertige Playbooks, zu folgenden Themen zum Download angeboten: -> ''[[https://github.com/ansible/ansible-examples/tree/master/jboss-standalone|jboss-standolone]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/lamp_simple_rhel7|lamp_simple_rhel7]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/mongodb|mongodb]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/mongodb|tomcat-standalone]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/wordpress-nginx_rhel7|wordpress-nginx-rhel7]]'' und viele mehr.+''Unter dem unten aufgeführten Link, werden von Ansible unteranderem bereits fertige Playbooks, zu folgenden Themen zum Download angeboten:'' -> ''[[https://github.com/ansible/ansible-examples/tree/master/jboss-standalone|jboss-standolone]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/lamp_simple_rhel7|lamp_simple_rhel7]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/mongodb|mongodb]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/mongodb|tomcat-standalone]]'', ''[[https://github.com/ansible/ansible-examples/tree/master/wordpress-nginx_rhel7|wordpress-nginx-rhel7]] und viele mehr.''
  
   * ''GitHub Link -> https://github.com/ansible/ansible-examples''   * ''GitHub Link -> https://github.com/ansible/ansible-examples''
Line 808: Line 814:
   * https://nsrc.org/workshops/2015/rwnog/raw-attachment/wiki/Track2Agenda/first-playbook.htm   * https://nsrc.org/workshops/2015/rwnog/raw-attachment/wiki/Track2Agenda/first-playbook.htm
   * https://cloudacademy.com/blog/building-ansible-playbooks-step-by-step/   * https://cloudacademy.com/blog/building-ansible-playbooks-step-by-step/
 +  * https://www.tecmint.com/install-and-configure-ansible-automation-tool-in-linux/
  
 ---- ----
Line 838: Line 845:
   * [[http://docs.ansible.com/ansible/list_of_web_infrastructure_modules.html|Web Infrastructure Modules]]   * [[http://docs.ansible.com/ansible/list_of_web_infrastructure_modules.html|Web Infrastructure Modules]]
   * [[http://docs.ansible.com/ansible/list_of_windows_modules.html|Windows Modules]]   * [[http://docs.ansible.com/ansible/list_of_windows_modules.html|Windows Modules]]
- 
- 
- 
  
  
 ---- ----
- 
- 
- 
- 
  
 ===== Weiteres ===== ===== Weiteres =====
  • redhat/other-redhat/ansible/start.1502369167.txt.gz
  • Last modified: 2017/08/10 14:46
  • by michael