diff --git a/ansible/roles/common/templates/rsyslog.conf.j2 b/ansible/roles/common/templates/rsyslog.conf.j2 index 5fd5f0406f..8e129addaf 100755 --- a/ansible/roles/common/templates/rsyslog.conf.j2 +++ b/ansible/roles/common/templates/rsyslog.conf.j2 @@ -60,6 +60,12 @@ $template NeutronMetadataAgentFile,"/var/log/neutron/neutron-metadata-agent.log" $template NeutronL3AgentFile,"/var/log/neutron/neutron-l3-agent.log" :syslogtag,contains,"neutron-l3-agent" ?NeutronL3AgentFile +$template KeystoneErrorFile,"/var/log/keystone/keystone-error.log" +:syslogtag,contains,"keystone-error" ?KeystoneErrorFile + +$template KeystoneAccessFile,"/var/log/keystone/keystone-access.log" +:syslogtag,contains,"keystone-access" ?KeystoneAccessFile + $template DynFile,"/var/log/syslog.log" *.* ?DynFile & ~ diff --git a/ansible/roles/keystone/tasks/start.yml b/ansible/roles/keystone/tasks/start.yml index 3833ef9ad9..1187f99d1c 100644 --- a/ansible/roles/keystone/tasks/start.yml +++ b/ansible/roles/keystone/tasks/start.yml @@ -13,6 +13,8 @@ insecure_registry: "{{ docker_insecure_registry }}" name: keystone image: "{{ keystone_image_full }}" - volumes: "{{ node_config_directory }}/keystone/:/opt/kolla/config_files/:ro" + volumes: + - "{{ node_config_directory }}/keystone/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" diff --git a/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 b/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 index 5c46c8be68..875b977efc 100644 --- a/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 +++ b/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 @@ -11,8 +11,8 @@ Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr = 2.4> ErrorLogFormat "%{cu}t %M" - ErrorLog /var/log/{{ apache_dir }}/keystone.log - CustomLog /var/log/{{ apache_dir }}/keystone_access.log combined + ErrorLog "|/usr/bin/logger -t keystone-error" + CustomLog "|/usr/bin/logger -t keystone-access" combined @@ -24,6 +24,6 @@ Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr = 2.4> ErrorLogFormat "%{cu}t %M" - ErrorLog /var/log/{{ apache_dir }}/keystone.log - CustomLog /var/log/{{ apache_dir }}/keystone_access.log combined + ErrorLog "|/usr/bin/logger -t keystone-error" + CustomLog "|/usr/bin/logger -t keystone-access" combined