34 lines
960 B
YAML
34 lines
960 B
YAML
---
|
|
- include_tasks: logging_by_syslog.yml
|
|
with_items:
|
|
- docker-compose
|
|
- docker-compose-transfer
|
|
- docker-compose-erc-native
|
|
loop_control:
|
|
loop_var: file
|
|
|
|
- name: Set the local container logs configuration file
|
|
template:
|
|
src: 31-oracle-docker.conf.j2
|
|
dest: /etc/rsyslog.d/31-oracle-docker.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Set the log configuration file to send container logs to remote server
|
|
template:
|
|
src: 36-oracle-remote-logging.conf.j2
|
|
dest: /etc/rsyslog.d/36-oracle-remote-logging.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
when: syslog_server_port is defined
|
|
|
|
- name: Discarding unwanted messages in rsyslog
|
|
blockinfile:
|
|
path: /etc/rsyslog.conf
|
|
insertbefore: "# Where to place spool and state files"
|
|
marker: "#{mark} add string to discarding unwanted messages"
|
|
content: ':msg, contains, "ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY" ~'
|
|
notify: restart rsyslog
|