Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung Nächste ÜberarbeitungBeide Seiten der Revision |
centos:ansible:detail [29.06.2020 21:08. ] – [Module] django | centos:ansible:detail [29.06.2020 21:42. ] – Ansible - Erweiterte Konfigurationsbeispiele django |
---|
====== Ansible - Erweiterte Konfigurationsbeispiele ====== | ====== Ansible - Erweiterte Konfigurationsbeispiele ====== |
{{:centos:ansible:ansible_logo.png?nolink&125|Bild: Ansible Logo}} \\ \\ | {{:centos:ansible:ansible_logo.png?nolink&125|Bild: Ansible Logo}} \\ \\ |
| |
<WRAP center round todo 55%> | |
**Seite in der Entstehung, noch nicht aktuell! Wird laufend aktualisiert!** | |
</WRAP> | |
| |
| |
Nachdem wir uns bereits eingehend mit den **[[centos:ansible:start#grundlagen|Grundlagen]]**, mit der **[[centos:ansible:start#installation|Installation von Ansible]]** und auch schon mit der Grundkonfiguration beschäftigt sowie erste Erfahrungen mit **[[centos:ansible:first#playbook_-_beispiele|Playbooks]]** gesammelt haben, wollen wir uns nun mit der tiefergehenden Konfiguration von Ansible beschäftigen. | Nachdem wir uns bereits eingehend mit den **[[centos:ansible:start#grundlagen|Grundlagen]]**, mit der **[[centos:ansible:start#installation|Installation von Ansible]]** und auch schon mit der Grundkonfiguration beschäftigt sowie erste Erfahrungen mit **[[centos:ansible:first#playbook_-_beispiele|Playbooks]]** gesammelt haben, wollen wir uns nun mit der tiefergehenden Konfiguration von Ansible beschäftigen. |
| |
<html><pre class="code"> | <html><pre class="code"> |
<font style="color: rgb(43, 100, 164)">Using /etc/ansible/ansible.cfg as config file</font> | |
<font style="color: rgb(0, 0, 0)">BECOME password: | <font style="color: rgb(0, 0, 0)">BECOME password: |
| |
PLAY [demo] ************************************************************************************************************************* | PLAY [demo] ************************************************************************************************************************* |
| |
TASK [Gathering Facts] *****************************************************************************************************************</font> | TASK [Gathering Facts] **************************************************************************************************************</font> |
<font style="color: rgb(25, 100, 5)">ok: [demo]</font><br> | <font style="color: rgb(25, 100, 5)">ok: [demo]</font><br> |
<font style="color: rgb(0, 0, 0)">TASK [***base*** : Gruppe für (WEB-Entwickler) 'ruben' erstellen] *******************************************************************************************************</font> | <font style="color: rgb(0, 0, 0)">TASK [***base*** : Gruppe für (WEB-Entwickler) 'ruben' erstellen] *******************************************************************</font> |
<font style="color: rgb(196, 160, 0)">changed: [www8.dmz.nausch.org] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: chrony", "Installed: chrony-3.3-3.el8.x86_64"]}</font><br> | <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
<font style="color: rgb(0, 0, 0)">TASK [Check if /etc/chrony.orig does exists] *******************************************************************************************</font> | <font style="color: rgb(0, 0, 0)">TASK [***base*** : WEB-Admin Nutzerkonto für den User 'ruben' mit frn zugehörigen UID '1010' anlegen un der Gruppe 'ruben' zuordnen.] </font> |
<font style="color: rgb(25, 100, 5)">ok: [www8.dmz.nausch.org] => {"changed": false, "stat": {"exists": false}}</font><br> | <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
<font style="color: rgb(0, 0, 0)">TASK [Make a copy of /etc/chrony.conf as /etc/chrony.conf.orig] ************************************************************************</font> | <font style="color: rgb(0, 0, 0)">TASK [***base*** : Initiales Passwort für den WEB-Admin 'ruben' hinterlegen] ********************************************************</font> |
<font style="color: rgb(196, 160, 0)">changed: [www8.dmz.nausch.org] => {"changed": true, "checksum": "89175e7c294dedf12bd473a952014e2cefd5766d", "dest": "/etc/chrony.conf.orig", "gid": 0, "group": "root", "md5sum": "97078948a9e2c1b99ab3e38d26a3311d", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 1085, "src": "/etc/chrony.conf", "state": "file", "uid": 0}</font><br> | <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
<font style="color: rgb(0, 0, 0)">TASK [Copy template config-file in place] **********************************************************************************************</font> | <font style="color: rgb(0, 0, 0)">TASK [***chrony*** : Installation des Deamon 'chrony' (in der aktuellsten Version)] *************************************************</font> |
<font style="color: rgb(196, 160, 0)">changed: [www8.dmz.nausch.org] => {"changed": true, "checksum": "37539ecdd11393937e5596894db41a02c6121c5f", "dest": "/etc/chrony.conf", "gid": 0, "group": "root", "md5sum": "adde7eeb1766f7f83bd3fba6cc30ec23", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 1265, "src": "/home/ansible/.ansible/tmp/ansible-tmp-1578323551.4891849-132640554634531/source", "state": "file", "uid": 0}</font><br> | <font style="color: rgb(25, 100, 5)">ok: [demo]</font><br> |
<font style="color: rgb(0, 0, 0)">TASK [Make sure Chrony is started up] **************************************************************************************************</font> | <font style="color: rgb(0, 0, 0)">TASK [***chrony*** : 1) Überprüfen ob das Backup der Konfigurationsdatei '/etc/chrony.conf' bereits existiert] **********************</font> |
<font style="color: rgb(196, 160, 0)">changed: [www8.dmz.nausch.org] => {"changed": true, "enabled": true, "name": "chronyd", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "sysinit.target system.slice -.mount systemd-tmpfiles-setup.service sntp.service ntpdate.service tmp.mount systemd-journald.socket ntpd.service basic.target", "AllowIsolate": "no", "AmbientCapabilities": "", "AssertResult": "no", "AssertTimestampMonotonic": "0", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "CPUAccounting": "no", "CPUQuotaPerSecUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend", "CollectMode": "inactive", "ConditionResult": "no", "ConditionTimestampMonotonic": "0", "ConfigurationDirectoryMode": "0755", "Conflicts": "systemd-timesyncd.service shutdown.target ntpd.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "NTP client/server", "DevicePolicy": "auto", "Documentation": "man:chronyd(8) man:chrony.conf(5)", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/chronyd (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/chronyd ; argv[]=/usr/sbin/chronyd $OPTIONS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPost": "{ path=/usr/libexec/chrony-helper ; argv[]=/usr/libexec/chrony-helper update-daemon ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/chronyd.service", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "chronyd.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestampMonotonic": "0", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "16777216", "LimitMEMLOCKSoft": "16777216", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "4096", "LimitNOFILESoft": "1024", "LimitNPROC": "31132", "LimitNPROCSoft": "31132", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "31132", "LimitSIGPENDINGSoft": "31132", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogsDirectoryMode": "0755", "MainPID": "0", "MemoryAccounting": "yes", "MemoryCurrent": "[not set]", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "Names": "chronyd.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/var/run/chrony/chronyd.pid", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "yes", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "yes", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "full", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "sysinit.target -.mount system.slice", "RequiresMountsFor": "/var/tmp", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestampMonotonic": "0", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "[not set]", "TasksMax": "26213", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "forking", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "enabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}</font><br> | <font style="color: rgb(25, 100, 5)">ok: [demo]</font><br> |
<font style="color: rgb(0, 0, 0)">PLAY RECAP ***************************************************************************************************************************************</font> | <font style="color: rgb(0, 0, 0)">TASK [***chrony*** : 2) Von der bestehenden originalen Konfigurationsdatei '/etc/chrony.conf' ein Backup '/etc/chrony.conf'.orig erstellen] *****************************************************************************************************************************</font> |
<font style="color: rgb(196, 160, 0)">www8.dmz.nausch.org </font><font style="color: rgb(0, 0, 0)">: </font><font style="color: rgb(25, 100, 5)">ok=6 </font><font style="color: rgb(196, 160, 0)">changed=0 </font><font style="color: rgb(0, 0, 0)">unreachable=0 failed=0 skipped=0 rescued=0 ignored=0</font><br></pre> | <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***chrony*** : Template Konfigurationsdatei an Ort und Stelle kopieren und Variablen setzen] **********************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***chrony*** : Sicherstellen dass der Daemon 'chrony' (beim Systemstart) gestartet wird und läuft] ***************************</font> |
| <font style="color: rgb(25, 100, 5)">ok: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : Installation des Deamon 'httpd' (in der aktuellsten Version)] *****************************************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : 1) Überprüfen ob das Backup der Konfigurationsdatei '/etc/httpd/conf/httpd.conf' bereits existiert] ***************</font> |
| <font style="color: rgb(25, 100, 5)">ok: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : 2) Von der bestehenden originalen Konfigurationsdatei '/etc/httpd/conf/httpd.conf' ein Backup '/etc/httpd/conf/httpd.conf.orig' erstellen] *************************************************************************************************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : Template Konfigurationsdatei an Ort und Stelle kopieren und Variablen setzen] *************************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : default-Homepage an Ort und Stelle kopieren] **********************************************************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : Sicherstellen dass der Daemon 'httpd' (beim Systemstart) gestartet wird und läuft] *******************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">TASK [***www*** : Paketfilter anpassen und Port 80 (HTTP) öffnen] *******************************************************************</font> |
| <font style="color: rgb(196, 160, 0)">changed: [demo]</font><br> |
| <font style="color: rgb(0, 0, 0)">PLAY RECAP *************************************************************************************************************************************</font> |
| <font style="color: rgb(196, 160, 0)">demo </font><font style="color: rgb(0, 0, 0)">: </font><font style="color: rgb(25, 100, 5)">ok=16 </font><font style="color: rgb(196, 160, 0)">changed=11 </font><font style="color: rgb(0, 0, 0)">unreachable=0 failed=0 skipped=0 rescued=0 ignored=0</font><br></pre> |
</html> | </html> |
| |
| ====== Links ====== |
\\ \\ \\ | * **[[centos:ansible:first|zurück zum Kapitel "Erste Schritte Rund um Ansible"]] <= ** |
| * ** [[centos:ansible:start|Zurück zur "Ansible"-Übersicht]]** |
FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME | * **[[wiki:start|Zurück zu >>Projekte und Themenkapitel<<]]** |
| * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]** |
| |
/* https://gerardnico.com/infra/ansible/start */ | /* https://gerardnico.com/infra/ansible/start */ |
| |