optimized snmpd
This commit is contained in:
@@ -7,9 +7,7 @@
|
|||||||
msg: Debug
|
msg: Debug
|
||||||
|
|
||||||
# import role webserver
|
# import role webserver
|
||||||
- import_role:
|
- import_role: webserver
|
||||||
name: webserver # required. The name of the role to be executed.
|
|
||||||
when: preinstalled == false or preinstalled is not defined
|
|
||||||
|
|
||||||
# install software
|
# install software
|
||||||
- include_tasks: prepare_system.yml
|
- include_tasks: prepare_system.yml
|
||||||
|
|||||||
@@ -11,10 +11,7 @@
|
|||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK" # not required. The marker line template. C({mark}) will be replaced with the values C(in marker_begin) (default="BEGIN") and C(marker_end) (default="END"). Using a custom marker without the C({mark}) variable may result in the block being repeatedly inserted on subsequent playbook runs.
|
marker: "# {mark} ANSIBLE MANAGED BLOCK" # not required. The marker line template. C({mark}) will be replaced with the values C(in marker_begin) (default="BEGIN") and C(marker_end) (default="END"). Using a custom marker without the C({mark}) variable may result in the block being repeatedly inserted on subsequent playbook runs.
|
||||||
block: |
|
block: |
|
||||||
################################################################################
|
################################################################################
|
||||||
# SECTION: {{ item }}
|
# SECTION: custom settings
|
||||||
loop:
|
|
||||||
- ACLs
|
|
||||||
- Extends
|
|
||||||
|
|
||||||
- name: server | snmpd | stop service
|
- name: server | snmpd | stop service
|
||||||
service:
|
service:
|
||||||
@@ -30,7 +27,7 @@
|
|||||||
lineinfile:
|
lineinfile:
|
||||||
path: "/etc/snmp/snmpd.conf" # required. The file to modify. Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name).
|
path: "/etc/snmp/snmpd.conf" # required. The file to modify. Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name).
|
||||||
line: "rouser {{snmp_user }} authpriv -V systemonly"
|
line: "rouser {{snmp_user }} authpriv -V systemonly"
|
||||||
insertafter: "# SECTION: ACLs"
|
insertafter: "# SECTION: custom settings"
|
||||||
|
|
||||||
- name: server | snmpd start service
|
- name: server | snmpd start service
|
||||||
service:
|
service:
|
||||||
|
|||||||
@@ -11,5 +11,5 @@
|
|||||||
path: "/etc/snmp/snmpd.conf"
|
path: "/etc/snmp/snmpd.conf"
|
||||||
state: present
|
state: present
|
||||||
line: "extend bind /etc/snmp/nginx"
|
line: "extend bind /etc/snmp/nginx"
|
||||||
insertafter: "# SECTION: Extends"
|
insertafter: "# SECTION: custom settings"
|
||||||
notify: restart_snmpd
|
notify: restart_snmpd
|
||||||
Reference in New Issue
Block a user