Ansible Script 추가

This commit is contained in:
ByeonJungHun
2023-12-19 13:36:16 +09:00
parent 0273450ff6
commit 05cb8d9269
2610 changed files with 281893 additions and 0 deletions

View File

@@ -0,0 +1 @@
UserParameter=dev2_iac_pass_failed,pam_tally2 -u dev2-iac | awk '/Failures/ {getline; print $2}'

View File

@@ -0,0 +1 @@
UserParameter=dev2_pass_failed,pam_tally2 -u dev2 | awk '/Failures/ {getline; print $2}'

View File

@@ -0,0 +1,3 @@
# This is an sample userparameters file.
UserParameter=mysql.ping_to,mysqladmin -uroot ping | grep -c alive

View File

@@ -0,0 +1 @@
UserParameter=root_pass_failed,pam_tally2 -u root | awk '/Failures/ {getline; print $2}'

View File

@@ -0,0 +1 @@
UserParameter=do.something, powershell -NoProfile -ExecutionPolicy Bypass -File {{ zabbix_win_install_dir }}\scripts\{{ item.name }}\doSomething.ps1

View File

@@ -0,0 +1 @@
UserParameter=zombie.count,ps -ef | grep defunct | egrep -v grep | wc -l

View File

@@ -0,0 +1 @@
UserParameter=zombie.list,ps -ef | grep defunct | egrep -v grep

View File

@@ -0,0 +1,140 @@
{{ ansible_managed | comment }}
# This is a configuration file for Zabbix Agent 2
# To get more information about Zabbix, visit http://www.zabbix.com
# This configuration file is "minimalized", which means all the original comments
# are removed. The full documentation for your Zabbix Agent 2 can be found here:
# https://www.zabbix.com/documentation/{{ zabbix_agent_version }}/en/manual/appendix/config/zabbix_agent2{{ "_win" if ansible_os_family == "Windows" else "" }}
{% if ansible_os_family != "Windows" %}
PidFile={{ zabbix_agent2_pidfile }}
{% endif %}
LogType={{ zabbix_agent2_logtype }}
{% if ansible_os_family == "Windows" %}
LogFile={{ zabbix_agent2_win_logfile }}
{% else %}
LogFile={{ zabbix_agent2_logfile }}
{% endif %}
LogFileSize={{ zabbix_agent2_logfilesize }}
DebugLevel={{ zabbix_agent2_debuglevel }}
{% if zabbix_agent2_sourceip is defined and zabbix_agent2_sourceip %}
SourceIP={{ zabbix_agent2_sourceip }}
{% endif %}
Server={{ zabbix_agent2_server }}
ListenPort={{ zabbix_agent2_listenport }}
{% if zabbix_agent2_listenip is defined and zabbix_agent2_listenip !='0.0.0.0' and zabbix_agent2_listenip %}
ListenIP={{ zabbix_agent2_listenip }}
{% endif %}
{% if zabbix_agent2_statusport is defined and zabbix_agent2_statusport %}
StatusPort={{ zabbix_agent2_statusport }}
{% endif %}
ServerActive={{ zabbix_agent2_serveractive }}
{% if zabbix_agent2_hostname is defined and zabbix_agent2_hostname %}
Hostname={{ zabbix_agent2_hostname }}
{% endif %}
{% if zabbix_agent2_hostnameitem is defined and zabbix_agent2_hostnameitem %}
HostnameItem={{ zabbix_agent2_hostnameitem }}
{% endif %}
{% if zabbix_agent2_hostmetadata is defined and zabbix_agent2_hostmetadata %}
HostMetadata={{ zabbix_agent2_hostmetadata }}
{% endif %}
{% if zabbix_agent2_hostmetadataitem is defined and zabbix_agent2_hostmetadataitem %}
HostMetadataItem={{ zabbix_agent2_hostmetadataitem }}
{% endif %}
{% if zabbix_agent2_hostinterface is defined and zabbix_agent2_hostinterface %}
HostInterface={{ zabbix_agent2_hostinterface }}
{% endif %}
{% if zabbix_agent2_hostinterfaceitem is defined and zabbix_agent2_hostinterfaceitem %}
HostInterfaceItem={{ zabbix_agent2_hostinterfaceitem }}
{% endif %}
{% if zabbix_agent2_allow_key is defined and zabbix_agent2_allow_key %}
{% for item in zabbix_agent2_allow_key %}
AllowKey={{ item }}
{% endfor %}
{% endif %}
{% if zabbix_agent2_deny_key is defined and zabbix_agent2_deny_key %}
{% for item in zabbix_agent2_deny_key %}
DenyKey={{ item }}
{% endfor %}
{% endif %}
RefreshActiveChecks={{ zabbix_agent2_refreshactivechecks }}
BufferSend={{ zabbix_agent2_buffersend }}
BufferSize={{ zabbix_agent2_buffersize }}
{% if zabbix_agent2_enablepersistentbuffer is defined and zabbix_agent2_enablepersistentbuffer %}
EnablePersistentBuffer={{ zabbix_agent2_enablepersistentbuffer }}
{% endif %}
{% if zabbix_agent2_persistentbufferperiod is defined and zabbix_agent2_persistentbufferperiod %}
PersistentBufferPeriod={{ zabbix_agent2_persistentbufferperiod }}
{% endif %}
{% if zabbix_agent2_persistentbufferfile is defined and zabbix_agent2_persistentbufferfile %}
PersistentBufferFile={{ zabbix_agent2_persistentbufferfile }}
{% endif %}
{% if zabbix_agent2_zabbix_alias is defined and zabbix_agent2_zabbix_alias %}
{% if zabbix_agent2_zabbix_alias is string %}
Alias={{ zabbix_agent2_zabbix_alias }}
{% else %}
{% for item in zabbix_agent2_zabbix_alias %}
Alias={{ item }}
{% endfor %}
{% endif %}
{% endif %}
Timeout={{ zabbix_agent2_timeout }}
{% if ansible_os_family == "Windows" %}
Include={{ zabbix_agent_win_include }}
{% else %}
Include={{ zabbix_agent2_include }}/{{ zabbix_agent2_include_pattern }}
{% endif %}
{% if zabbix_agent2_additional_include is defined and zabbix_agent2_additional_include is iterable and zabbix_agent2_additional_include is not string %}
{% for include in zabbix_agent2_additional_include %}
Include={{ include }}
{% endfor %}
{% endif %}
UnsafeUserParameters={{ zabbix_agent2_unsafeuserparameters }}
{% if ansible_os_family != "Windows" %}
ControlSocket={{ zabbix_agent2_controlsocket }}
{% endif %}
{% if zabbix_agent2_tlsconnect is defined and zabbix_agent2_tlsconnect %}
TLSConnect={{ zabbix_agent2_tlsconnect }}
{% endif %}
{% if zabbix_agent2_tlsaccept is defined and zabbix_agent2_tlsaccept %}
TLSAccept={{ zabbix_agent2_tlsaccept }}
{% endif %}
{% if zabbix_agent2_tlscafile is defined and zabbix_agent2_tlscafile %}
TLSCAFile={{ zabbix_agent2_tlscafile }}
{% endif %}
{% if zabbix_agent2_tlscrlfile is defined and zabbix_agent2_tlscrlfile %}
TLSCRLFile={{ zabbix_agent2_tlscrlfile }}
{% endif %}
{% if zabbix_agent2_tlsservercertissuer is defined and zabbix_agent2_tlsservercertissuer %}
TLSServerCertIssuer={{ zabbix_agent2_tlsservercertissuer }}
{% endif %}
{% if zabbix_agent2_tlsservercertsubject is defined and zabbix_agent2_tlsservercertsubject %}
TLSServerCertSubject={{ zabbix_agent2_tlsservercertsubject }}
{% endif %}
{% if zabbix_agent2_tlscertfile is defined and zabbix_agent2_tlscertfile %}
TLSCertFile={{ zabbix_agent2_tlscertfile }}
{% endif %}
{% if zabbix_agent2_tlskeyfile is defined and zabbix_agent2_tlskeyfile %}
TLSKeyFile={{ zabbix_agent2_tlskeyfile }}
{% endif %}
{% if zabbix_agent2_tlspskidentity is defined and zabbix_agent2_tlspskidentity %}
TLSPSKIdentity={{ zabbix_agent2_tlspskidentity }}
{% endif %}
{% if zabbix_agent2_tlspskfile is defined and zabbix_agent2_tlspskfile %}
TLSPSKFile={{ zabbix_agent2_tlspskfile }}
{% endif %}
{% if zabbix_agent2_plugins is defined and zabbix_agent2_plugins is iterable %}
{% for entry in zabbix_agent2_plugins %}
{% set my_name = entry['name'] %}
{% for property in entry['options'] %}
{% set param = property['parameter'] %}
{% set value = property['value'] %}
Plugins.{{ my_name }}.{{ param }}={{ value }}
{% endfor %}
{% endfor %}
{% endif %}
{% if zabbix_agent_version is version('6.0', '>=') %}
{% if zabbix_agent2_listenbacklog is defined and zabbix_agent2_listenbacklog %}
ListenBacklog={{ zabbix_agent2_listenbacklog }}
{% endif %}
{% endif %}

View File

@@ -0,0 +1,149 @@
{{ ansible_managed | comment }}
# This is a configuration file for Zabbix Agent
# To get more information about Zabbix, visit http://www.zabbix.com
# This configuration file is "minimalized", which means all the original comments
# are removed. The full documentation for your Zabbix Agent can be found here:
# https://www.zabbix.com/documentation/{{ zabbix_agent_version }}/en/manual/appendix/config/zabbix_agentd{{ "_win" if ansible_os_family == "Windows" else "" }}
{% if ansible_os_family != "Windows" %}
PidFile={{ zabbix_agent_pidfile }}
{% endif %}
{% if zabbix_agent_version is version('3.0', '>=') %}
LogType={{ zabbix_agent_logtype }}
{% endif %}
{% if ansible_os_family == "Windows" %}
LogFile={{ zabbix_agent_win_logfile }}
{% else %}
LogFile={{ zabbix_agent_logfile }}
{% endif %}
LogFileSize={{ zabbix_agent_logfilesize }}
DebugLevel={{ zabbix_agent_debuglevel }}
{% if zabbix_agent_sourceip is defined and zabbix_agent_sourceip %}
SourceIP={{ zabbix_agent_sourceip }}
{% endif %}
{% if zabbix_agent_version is version('6.0', '<=') %}
EnableRemoteCommands={{ zabbix_agent_enableremotecommands }}
{% else %}
{% if zabbix_agent_allowkeys is defined and zabbix_agent_allowkeys %}
AllowKey={{ zabbix_agent_allowkeys }}
{% endif %}
{% if zabbix_agent_denykeys is defined and zabbix_agent_denykeys %}
DenyKey={{ zabbix_agent_denykeys }}
{% endif %}
{% endif %}
LogRemoteCommands={{ zabbix_agent_logremotecommands }}
Server={{ zabbix_agent_server }}
ListenPort={{ zabbix_agent_listenport }}
{% if zabbix_agent_listenip is defined and zabbix_agent_listenip !='0.0.0.0' and zabbix_agent_listenip %}
ListenIP={{ zabbix_agent_listenip }}
{% endif %}
StartAgents={{ zabbix_agent_startagents }}
ServerActive={{ zabbix_agent_serveractive }}
{% if zabbix_agent_hostname is defined and zabbix_agent_hostname %}
Hostname={{ zabbix_agent_hostname }}
{% endif %}
{% if zabbix_agent_hostnameitem is defined and zabbix_agent_hostnameitem %}
HostnameItem={{ zabbix_agent_hostnameitem }}
{% endif %}
{% if zabbix_agent_hostmetadata is defined and zabbix_agent_hostmetadata %}
HostMetadata={{ zabbix_agent_hostmetadata }}
{% endif %}
{% if zabbix_agent_hostmetadataitem is defined and zabbix_agent_hostmetadataitem %}
HostMetadataItem={{ zabbix_agent_hostmetadataitem }}
{% endif %}
{% if zabbix_agent_allow_key is defined and zabbix_agent_allow_key %}
{% for item in zabbix_agent_allow_key %}
AllowKey={{ item }}
{% endfor %}
{% endif %}
{% if zabbix_agent_deny_key is defined and zabbix_agent_deny_key %}
{% for item in zabbix_agent_deny_key %}
DenyKey={{ item }}
{% endfor %}
{% endif %}
RefreshActiveChecks={{ zabbix_agent_refreshactivechecks }}
BufferSend={{ zabbix_agent_buffersend }}
BufferSize={{ zabbix_agent_buffersize }}
MaxLinesPerSecond={{ zabbix_agent_maxlinespersecond }}
{% if zabbix_agent_version is version_compare('6.2', '>=') %}
HeartbeatFrequency={{ zabbix_agent_heartbeatfrequency }}
{% endif %}
{% if zabbix_agent_zabbix_alias is defined and zabbix_agent_zabbix_alias %}
{% if zabbix_agent_zabbix_alias is string %}
Alias={{ zabbix_agent_zabbix_alias }}
{% else %}
{% for item in zabbix_agent_zabbix_alias %}
Alias={{ item }}
{% endfor %}
{% endif %}
{% endif %}
Timeout={{ zabbix_agent_timeout }}
{% if ansible_os_family != "Windows" %}
AllowRoot={{ zabbix_agent_allowroot }}
{% endif %}
{% if zabbix_agent_runas_user is defined and zabbix_agent_runas_user %}
User={{ zabbix_agent_runas_user }}
{% endif %}
{% if ansible_os_family == "Windows" %}
Include={{ zabbix_agent_win_include }}
{% else %}
Include={{ zabbix_agent_include }}/{{ zabbix_agent_include_pattern }}
{% endif %}
{% if zabbix_agent_additional_include is defined and zabbix_agent_additional_include is iterable and zabbix_agent_additional_include is not string %}
{% for include in zabbix_agent_additional_include %}
Include={{ include }}
{% endfor %}
{% endif %}
UnsafeUserParameters={{ zabbix_agent_unsafeuserparameters }}
{% if zabbix_agent_version is version_compare('2.2', '>=') %}
{% if ansible_os_family != "Windows" %}
LoadModulePath={{ zabbix_agent_loadmodulepath }}
{% endif %}
{% endif %}
{% if zabbix_agent_loadmodule is defined and zabbix_agent_loadmodule %}
{% if zabbix_agent_loadmodule is string %}
LoadModule={{ zabbix_agent_loadmodule }}
{% else %}
{% for module in zabbix_agent_loadmodule %}
LoadModule={{ module }}
{% endfor %}
{% endif %}
{% endif %}
{% if zabbix_agent_version is version_compare('3.0', '>=') %}
{% if zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect %}
TLSConnect={{ zabbix_agent_tlsconnect }}
{% endif %}
{% if zabbix_agent_tlsaccept is defined and zabbix_agent_tlsaccept %}
TLSAccept={{ zabbix_agent_tlsaccept }}
{% endif %}
{% if zabbix_agent_tlscafile is defined and zabbix_agent_tlscafile %}
TLSCAFile={{ zabbix_agent_tlscafile }}
{% endif %}
{% if zabbix_agent_tlscrlfile is defined and zabbix_agent_tlscrlfile %}
TLSCRLFile={{ zabbix_agent_tlscrlfile }}
{% endif %}
{% if zabbix_agent_tlsservercertissuer is defined and zabbix_agent_tlsservercertissuer %}
TLSServerCertIssuer={{ zabbix_agent_tlsservercertissuer }}
{% endif %}
{% if zabbix_agent_tlsservercertsubject is defined and zabbix_agent_tlsservercertsubject %}
TLSServerCertSubject={{ zabbix_agent_tlsservercertsubject }}
{% endif %}
{% if zabbix_agent_tlscertfile is defined and zabbix_agent_tlscertfile %}
TLSCertFile={{ zabbix_agent_tlscertfile }}
{% endif %}
{% if zabbix_agent_tlskeyfile is defined and zabbix_agent_tlskeyfile %}
TLSKeyFile={{ zabbix_agent_tlskeyfile }}
{% endif %}
{% if zabbix_agent_tlspskidentity is defined and zabbix_agent_tlspskidentity %}
TLSPSKIdentity={{ zabbix_agent_tlspskidentity }}
{% endif %}
{% if zabbix_agent_tlspskfile is defined and zabbix_agent_tlspskfile %}
TLSPSKFile={{ zabbix_agent_tlspskfile }}
{% endif %}
{% endif %}
{% if zabbix_agent_version is version('6.0', '>=') %}
{% if zabbix_agent_listenbacklog is defined and zabbix_agent_listenbacklog %}
ListenBacklog={{ zabbix_agent_listenbacklog }}
{% endif %}
{% endif %}