Dear Team,
there was a change happened in our environment for updating the
/etc/rsyslog.conf we executed the same via ansible playbook ( the playbook
will do only 2 things , it will copy the template -new updated the
rsyslog.conf and restart the deamon , but seems after the play , the whole
systemd deamons reloaded and which caused the sap application restart
and my playbook content is like below
we are using version ansible 2.2.1.0 and redhat 7.2
---
- name: Copy templates/rsyslog.conf to /etc/rsyslog.conf and restart syslogd
hosts: all
become: yes
handlers:
- name: restart-rsyslog
service: name=rsyslog state=restarted
tasks:
- name: Copy the template rsyslog.conf file to /etc/rsyslog.conf
copy: src=templates/rsyslog.conf dest=/etc/rsyslog.conf mode=0644
notify:
- restart-rsyslog
and the /var/log/message looks like this below
Mar 14 19:02:44 linux0012 systemd: Starting Session 3875 of user
sa-its-vcouser.
Mar 14 19:02:44 linux0012 python: ansible-setup Invoked with filter=*
gather_subset=['all'] fact_path=/etc/ansible/facts.d gather_timeout=10
Mar 14 19:02:54 linux0012 python: ansible-stat Invoked with
checksum_algorithm=sha1 mime=False get_checksum=True path=/etc/rsyslog.conf
checksum_algo=sha1 follow=
False get_md5=False
Mar 14 19:02:55 linux0012 python: ansible-copy Invoked with
src=/home/sa-its-vcouser/.ansible/tmp/ansible-tmp-1489514574.96-89549749599025/source
directory_mode=N
one force=True remote_src=None unsafe_writes=None selevel=None seuser=None
setype=None group=None content=NOT_LOGGING_PARAMETER dest=/etc/rsyslog.conf
serole=None origi
nal_basename=rsyslog.conf delimiter=None mode=0644 regexp=None owner=None
follow=False validate=None backup=False
Mar 14 19:03:12 linux0012 python: ansible-systemd Invoked with name=rsyslog
enabled=None daemon_reload=False state=restarted user=False masked=None
Mar 14 19:03:12 linux0012 systemd: Stopping SAP Instance SAP12...
Mar 14 19:03:12 linux0012 systemd: Stopping SAP Oracle Database SAP12...
Mar 14 19:03:14 linux0012 sapdb.sh: Trying to stop SAP12 database ...
Mar 14 19:03:14 linux0012 sapdb.sh: Log file: /home/SAP12adm/stopdb.log
Mar 14 19:03:15 linux0012 sapinstance.sh: stopping the SAP instance G00
Mar 14 19:03:15 linux0012 sapinstance.sh: Shutdown-Log is written to
/home/SAP12adm/stopsap_G00.log
Mar 14 19:03:39 linux0012systemd: Stopping SAP Instance D30...
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7448a75e-a6f9-409e-8193-d7a8bfd0c71a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.