File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ ipmi_exporter_modules:
1313 - chassis
1414 - sel
1515
16+ ipmi_exporter_sudo_commands :
17+ - /usr/sbin/ipmimonitoring
18+ - /usr/sbin/ipmi-sensors
19+ - /usr/sbin/ipmi-dcmi
20+ - /usr/sbin/ipmi-raw
21+ - /usr/sbin/bmc-info
22+ - /usr/sbin/ipmi-chassis
23+ - /usr/sbin/ipmi-sel
24+
1625ipmi_exporter_web_listen_address : " 0.0.0.0:9290"
1726
1827ipmi_exporter_tls_server_config : {}
Original file line number Diff line number Diff line change 3030 - ipmi_exporter
3131 - configure
3232 - ipmi_exporter_configure
33+
34+ - name : Create sudoers file to allow passwordless IPMI commands
35+ ansible.builtin.copy :
36+ dest : " /etc/sudoers.d/{{ ipmi_exporter_system_user }}"
37+ content : |
38+ {{ ipmi_exporter_system_user }} ALL=(ALL) NOPASSWD: {{ ipmi_exporter_sudo_commands | join(', ') }}
39+ owner : root
40+ group : root
41+ mode : ' 0440'
42+ become : true
43+ when : ipmi_exporter_system_user is defined
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ RestartSec=1
2323StartLimitInterval=0
2424
2525ProtectHome=yes
26- NoNewPrivileges=yes
2726
2827{% if (ansible_facts .packages .systemd | first ).version is version ('232' , '>=' ) %}
2928ProtectSystem=strict
You can’t perform that action at this time.
0 commit comments