Ensure logs folder is created in prep hosts tasks.

We have non fatal errors in the upgrade
jobs execution if the logs folder is not
created when adding the readme.txt file
to clarify the possible locations of
the logs.

Closes-Bug: 1811708
Change-Id: Ibc0a266bdc6630eaf34bfadeff21f7bd72fa75ad
(cherry picked from commit 1e318b569e)
(cherry picked from commit 93285264e7)
This commit is contained in:
Carlos Camacho 2019-01-14 16:06:21 +01:00
parent faa179fc6c
commit f7a00ac223
70 changed files with 403 additions and 206 deletions

View File

@ -155,13 +155,15 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/aodh
- /var/log/containers/httpd/aodh-api
- { 'path': /var/log/containers/aodh, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/aodh-api, setype: svirt_sandbox_file_t }
- { 'path': /var/log/aodh, setype: svirt_sandbox_file_t }
- name: aodh logs readme
copy:
dest: /var/log/aodh/readme.txt

View File

@ -111,10 +111,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/aodh
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/aodh, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/aodh, 'setype': svirt_sandbox_file_t }
- name: aodh logs readme
copy:
dest: /var/log/aodh/readme.txt

View File

@ -118,10 +118,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/aodh
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/aodh, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/aodh, 'setype': svirt_sandbox_file_t }
- name: aodh logs readme
copy:
dest: /var/log/aodh/readme.txt

View File

@ -118,10 +118,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/aodh
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/aodh, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/aodh, 'setype': svirt_sandbox_file_t }
- name: aodh logs readme
copy:
dest: /var/log/aodh/readme.txt

View File

@ -127,10 +127,14 @@ outputs:
- 'ceilometer_agent_central'
- "su ceilometer -s /bin/bash -c 'for n in {1..10}; do /usr/bin/ceilometer-upgrade && exit 0 || sleep 30; done; exit 1'"
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/ceilometer
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/ceilometer, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/ceilometer, 'setype': svirt_sandbox_file_t }
- name: ceilometer logs readme
copy:
dest: /var/log/ceilometer/readme.txt

View File

@ -98,10 +98,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/ceilometer
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/ceilometer, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ceilometer, 'setype': svirt_sandbox_file_t }
- name: ceilometer logs readme
copy:
dest: /var/log/ceilometer/readme.txt

View File

@ -106,10 +106,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/ceilometer
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/ceilometer, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ceilometer, 'setype': svirt_sandbox_file_t }
- name: ceilometer logs readme
copy:
dest: /var/log/ceilometer/readme.txt

View File

@ -123,10 +123,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/ceilometer
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/ceilometer, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ceilometer, 'setype': svirt_sandbox_file_t }
- name: ceilometer logs readme
copy:
dest: /var/log/ceilometer/readme.txt

View File

@ -220,13 +220,15 @@ outputs:
metadata_settings:
get_attr: [CinderBase, role_data, metadata_settings]
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/cinder
- /var/log/containers/httpd/cinder-api
- { 'path': /var/log/containers/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/cinder-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/cinder, 'setype': svirt_sandbox_file_t }
- name: cinder logs readme
copy:
dest: /var/log/cinder/readme.txt

View File

@ -154,11 +154,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/lib/cinder
- /var/log/containers/cinder
- { 'path': /var/lib/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/cinder, 'setype': svirt_sandbox_file_t }
- name: cinder logs readme
copy:
dest: /var/log/cinder/readme.txt

View File

@ -60,11 +60,13 @@ outputs:
value:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/cinder
- /var/lib/cinder
- { 'path': /var/log/containers/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/cinder, 'setype': svirt_sandbox_file_t }
- name: cinder logs readme
copy:
dest: /var/log/cinder/readme.txt

View File

@ -126,10 +126,12 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/cinder
- { 'path': /var/log/containers/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/cinder, 'setype': svirt_sandbox_file_t }
- name: cinder logs readme
copy:
dest: /var/log/cinder/readme.txt

View File

@ -116,10 +116,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/collectd
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/collectd, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/collectd, 'setype': svirt_sandbox_file_t }
- name: collectd logs readme
copy:
dest: /var/log/collectd/readme.txt

View File

@ -136,10 +136,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/congress
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/congress, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/congress, 'setype': svirt_sandbox_file_t }
- name: congress logs readme
copy:
dest: /var/log/congress/readme.txt

View File

@ -150,11 +150,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/mongodb
- /var/lib/mongodb
- { 'path': /var/log/mongodb, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/mongodb, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/mongodb, 'setype': svirt_sandbox_file_t }
- name: mongodb logs readme
copy:
dest: /var/log/mongodb/readme.txt

View File

@ -221,11 +221,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/mysql
- /var/lib/mysql
- { 'path': /var/log/containers/mysql, 'setype': 'svirt_sandbox_file_t' }
- { 'path': /var/lib/mysql, 'setype': 'svirt_sandbox_file_t' }
- { 'path': /var/log/mariadb, 'setype': 'svirt_sandbox_file_t' }
- name: mysql logs readme
copy:
dest: /var/log/mariadb/readme.txt

View File

@ -157,9 +157,11 @@ outputs:
file:
path: "{{ item }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/redis
- /var/run/redis
- { 'path': /var/log/containers/redis, 'setype': svirt_sandbox_file_t }
- { 'path': /var/run/redis, 'setype': container_var_run_t }
- { 'path': /var/log/redis, 'setype': svirt_sandbox_file_t }
- name: redis logs readme
copy:
dest: /var/log/redis/readme.txt

View File

@ -187,13 +187,16 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- {}
host_prep_tasks:
- name: create persistent log directories
- name: create persistent directories
file:
path: /var/log/containers/{{ item }}
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- ec2_api
- ec2_api_metadata
- { 'path': /var/log/containers/ec2_api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/ec2_api_metadata, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ec2_api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ec2_api_metadata, 'setype': svirt_sandbox_file_t }
- name: ec2_api logs readme
copy:
dest: /var/log/{{ item }}/readme.txt

View File

@ -106,10 +106,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory for fluentd
- name: create persistent directories
file:
path: /var/log/containers/fluentd
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/fluentd, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/fluentd, 'setype': svirt_sandbox_file_t }
- name: fluentd logs readme
copy:
dest: /var/log/fluentd/readme.txt

View File

@ -210,11 +210,13 @@ outputs:
host_prep_tasks:
- name: create persistent logs directory
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/gnocchi
- /var/log/containers/httpd/gnocchi-api
- { 'path': /var/log/containers/gnocchi, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/gnocchi-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/gnocchi, 'setype': svirt_sandbox_file_t }
- name: gnocchi logs readme
copy:
dest: /var/log/gnocchi/readme.txt

View File

@ -139,10 +139,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/gnocchi
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/gnocchi, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/gnocchi, 'setype': svirt_sandbox_file_t }
- name: gnocchi logs readme
copy:
dest: /var/log/gnocchi/readme.txt

View File

@ -139,10 +139,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/gnocchi
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/gnocchi, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/gnocchi, 'setype': svirt_sandbox_file_t }
- name: gnocchi logs readme
copy:
dest: /var/log/gnocchi/readme.txt

View File

@ -250,11 +250,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/haproxy
- /var/lib/haproxy
- { 'path': /var/log/containers/haproxy, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/haproxy, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/haproxy, 'setype': svirt_sandbox_file_t }
- name: haproxy logs readme
copy:
dest: /var/log/haproxy/readme.txt

View File

@ -172,13 +172,15 @@ outputs:
- ENABLE_ZAQAR=no
- ENABLE_ZUN=no
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/horizon
- /var/log/containers/httpd/horizon
- { 'path': /var/log/containers/horizon, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/horizon, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/horizon, 'setype': svirt_sandbox_file_t }
- name: horizon logs readme
copy:
dest: /var/log/horizon/readme.txt

View File

@ -170,13 +170,15 @@ outputs:
- /var/log/containers/httpd/ironic-api:/var/log/httpd
command: {get_attr: [OnlineDataMigrationsCommand, value]}
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/ironic
- /var/log/containers/httpd/ironic-api
- { 'path': /var/log/containers/ironic, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/ironic-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ironic, 'setype': svirt_sandbox_file_t }
- name: ironic logs readme
copy:
dest: /var/log/ironic/readme.txt

View File

@ -135,11 +135,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/ironic
- /var/lib/ironic
- { 'path': /var/log/containers/ironic, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/ironic, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ironic, 'setype': svirt_sandbox_file_t }
- name: ironic logs readme
copy:
dest: /var/log/ironic/readme.txt

View File

@ -166,10 +166,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent ironic-inspector logs directory
- name: create persistent directories
file:
path: /var/log/containers/ironic-inspector
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/ironic-inspector, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ironic-inspector, 'setype': svirt_sandbox_file_t }
- name: ironic-inspector logs readme
copy:
dest: /var/log/ironic-inspector/readme.txt

View File

@ -153,12 +153,14 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/lib/ironic
- /var/log/containers/ironic
- /var/log/containers/httpd/ironic-pxe
- { 'path': /var/lib/ironic, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/ironic, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/ironic-pxe, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/ironic, 'setype': svirt_sandbox_file_t }
- name: ironic logs readme
copy:
dest: /var/log/ironic/readme.txt

View File

@ -104,11 +104,15 @@ outputs:
host_prep_tasks:
- name: create persistent logs directory
file:
path: /var/log/containers/keepalived
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/keepalived, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/keepalived, 'setype': svirt_sandbox_file_t }
- name: keepalived logs readme
copy:
dest: /var/log/keepalived-readme.txt
dest: /var/log/keepalived/readme.txt
content: |
Log files from keepalived containers can be found under
/var/log/containers/keepalived.

View File

@ -32,13 +32,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/barbican
- /var/log/containers/httpd/barbican-api
- { 'path': /var/log/containers/barbican, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/barbican-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/barbican, 'setype': svirt_sandbox_file_t }
- name: barbican logs readme
copy:
dest: /var/log/barbican/readme.txt

View File

@ -32,10 +32,12 @@ outputs:
value:
- name: create persistent logs directory
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/glance
- { 'path': /var/log/containers/glance, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/glance, 'setype': svirt_sandbox_file_t }
- name: glance logs readme
copy:
dest: /var/log/glance/readme.txt

View File

@ -19,13 +19,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/heat
- /var/log/containers/httpd/heat-api-cfn
- { 'path': /var/log/containers/heat, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/heat-api-cfn, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/heat, 'setype': svirt_sandbox_file_t }
- name: heat logs readme
copy:
dest: /var/log/heat/readme.txt

View File

@ -19,13 +19,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/heat
- /var/log/containers/httpd/heat-api
- { 'path': /var/log/containers/heat, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/heat-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/heat, 'setype': svirt_sandbox_file_t }
- name: heat logs readme
copy:
dest: /var/log/heat/readme.txt

View File

@ -33,10 +33,14 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/heat
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/heat, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/heat, 'setype': svirt_sandbox_file_t }
- name: heat logs readme
copy:
dest: /var/log/heat/readme.txt

View File

@ -33,13 +33,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/keystone
- /var/log/containers/httpd/keystone
- { 'path': /var/log/containers/keystone, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/keystone, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/keystone, 'setype': svirt_sandbox_file_t }
- name: keystone logs readme
copy:
dest: /var/log/keystone/readme.txt

View File

@ -41,13 +41,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/neutron
- /var/log/containers/httpd/neutron-api
- { 'path': /var/log/containers/neutron, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/neutron-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/neutron, 'setype': svirt_sandbox_file_t }
- name: neutron logs readme
copy:
dest: /var/log/neutron/readme.txt

View File

@ -30,12 +30,14 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/neutron
- { 'path': /var/log/containers/neutron, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/neutron, 'setype': svirt_sandbox_file_t }
- name: neutron logs readme
copy:
dest: /var/log/neutron/readme.txt

View File

@ -31,13 +31,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/nova
- /var/log/containers/httpd/nova-api
- { 'path': /var/log/containers/nova, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/nova-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/nova, 'setype': svirt_sandbox_file_t }
- name: nova logs readme
copy:
dest: /var/log/nova/readme.txt

View File

@ -51,10 +51,14 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/nova
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- { 'path': /var/log/containers/nova, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/nova, 'setype': svirt_sandbox_file_t }
- name: nova logs readme
copy:
dest: /var/log/nova/readme.txt

View File

@ -30,13 +30,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/nova
- /var/log/containers/httpd/nova-placement
- { 'path': /var/log/containers/nova, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/nova-placement, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/nova, 'setype': svirt_sandbox_file_t }
- name: nova logs readme
copy:
dest: /var/log/nova/readme.txt

View File

@ -32,13 +32,15 @@ outputs:
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/panko
- /var/log/containers/httpd/panko-api
- { 'path': /var/log/containers/panko, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/panko-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/panko, 'setype': svirt_sandbox_file_t }
- name: panko logs readme
copy:
dest: /var/log/panko/readme.txt

View File

@ -124,13 +124,15 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: Create persistent manila logs directory
- name: Create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/manila
- /var/log/containers/httpd/manila-api
- { 'path': /var/log/containers/manila, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/manila-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/manila, 'setype': svirt_sandbox_file_t }
- name: manila logs readme
copy:
dest: /var/log/manila/readme.txt

View File

@ -109,10 +109,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: Create persistent manila logs directory
- name: create persistent directories
file:
path: /var/log/containers/manila
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/manila, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/manila, 'setype': svirt_sandbox_file_t }
- name: manila logs readme
copy:
dest: /var/log/manila/readme.txt

View File

@ -124,11 +124,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/manila
- /var/lib/manila
- { 'path': /var/log/containers/manila, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/manila, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/manila, 'setype': svirt_sandbox_file_t }
- name: manila logs readme
copy:
dest: /var/log/manila/readme.txt

View File

@ -89,9 +89,16 @@ outputs:
- /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro
command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS']
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/memcached, 'setype': svirt_sandbox_file_t }
- name: memcached logs readme
copy:
dest: /var/log/memcached-readme.txt
dest: /var/log/memcached/readme.txt
content: |
Memcached container logs to stdout/stderr only.
ignore_errors: true

View File

@ -183,10 +183,14 @@ outputs:
# the Mistral API image so that we get tripleo* actions
command: "/usr/bin/bootstrap_host_exec mistral_api su mistral -s /bin/bash -c 'mistral-db-manage --config-file /etc/mistral/mistral.conf populate'"
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/mistral
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/mistral, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/mistral, 'setype': svirt_sandbox_file_t }
- name: mistral logs readme
copy:
dest: /var/log/mistral/readme.txt

View File

@ -116,10 +116,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/mistral
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/mistral, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/mistral, 'setype': svirt_sandbox_file_t }
- name: mistral logs readme
copy:
dest: /var/log/mistral/readme.txt

View File

@ -116,10 +116,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/mistral
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/mistral, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/mistral, 'setype': svirt_sandbox_file_t }
- name: mistral logs readme
copy:
dest: /var/log/mistral/readme.txt

View File

@ -124,10 +124,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/mistral
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/mistral, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/mistral, 'setype': svirt_sandbox_file_t }
- name: mistral logs readme
copy:
dest: /var/log/mistral/readme.txt

View File

@ -148,11 +148,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/nova
- /var/lib/nova
- { 'path': /var/log/containers/nova, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/nova, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/nova, 'setype': svirt_sandbox_file_t }
- name: nova logs readme
copy:
dest: /var/log/nova/readme.txt

View File

@ -197,13 +197,15 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- {}
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/octavia
- /var/log/containers/httpd/octavia-api
- { 'path': /var/log/containers/octavia, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/octavia-api, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/octavia, 'setype': svirt_sandbox_file_t }
- name: octavia logs readme
copy:
dest: /var/log/octavia/readme.txt

View File

@ -123,10 +123,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/octavia
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/octavia, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/octavia, 'setype': svirt_sandbox_file_t }
- name: octavia logs readme
copy:
dest: /var/log/octavia/readme.txt

View File

@ -119,10 +119,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/octavia
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/octavia, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/octavia, 'setype': svirt_sandbox_file_t }
- name: octavia logs readme
copy:
dest: /var/log/octavia/readme.txt

View File

@ -131,10 +131,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/octavia
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/octavia, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/octavia, 'setype': svirt_sandbox_file_t }
- name: octavia logs readme
copy:
dest: /var/log/octavia/readme.txt

View File

@ -154,14 +154,15 @@ outputs:
- /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/lib/opendaylight/snapshots
- /var/lib/opendaylight/journal
- /var/lib/opendaylight/data
- /var/log/opendaylight
- /var/log/containers/opendaylight/karaf/logs
- { 'path': /var/lib/opendaylight/snapshots, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/opendaylight/journal, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/opendaylight/data, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/opendaylight, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/opendaylight/karaf/logs, 'setype': svirt_sandbox_file_t }
- name: opendaylight logs readme
copy:
dest: /var/log/opendaylight/readme.txt

View File

@ -119,10 +119,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/openvswitch
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/openvswitch, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/openvswitch, 'setype': svirt_sandbox_file_t }
- name: openvswitch logs readme
copy:
dest: /var/log/openvswitch/readme.txt

View File

@ -192,11 +192,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/openvswitch
- /var/lib/openvswitch/ovn
- { 'path': /var/log/containers/openvswitch, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/openvswitch/ovn, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/openvswitch, 'setype': svirt_sandbox_file_t }
- name: openvswitch logs readme
copy:
dest: /var/log/openvswitch/readme.txt

View File

@ -234,11 +234,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/lib/cinder
- /var/log/containers/cinder
- { 'path': /var/log/containers/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/cinder, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/cinder, 'setype': svirt_sandbox_file_t }
- name: cinder logs readme
copy:
dest: /var/log/cinder/readme.txt

View File

@ -306,11 +306,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/mysql
- /var/lib/mysql
- {'path': /var/log/containers/mysql, 'setype': 'svirt_sandbox_file_t'}
- {'path': /var/lib/mysql, 'setype': 'svirt_sandbox_file_t'}
- {'path': /var/log/mariadb, 'setype': 'svirt_sandbox_file_t'}
- name: mysql logs readme
copy:
dest: /var/log/mariadb/readme.txt

View File

@ -284,12 +284,14 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/lib/redis
- /var/log/containers/redis
- /var/run/redis
- { 'path': /var/lib/redis, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/redis, 'setype': svirt_sandbox_file_t }
- { 'path': /var/run/redis, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/redis, 'setype': svirt_sandbox_file_t }
- name: redis logs readme
copy:
dest: /var/log/redis/readme.txt

View File

@ -213,11 +213,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- /var/log/containers/manila
- /var/lib/manila
- { 'path': /var/log/containers/manila, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/manila, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/manila, 'setype': svirt_sandbox_file_t }
- name: manila logs readme
copy:
dest: /var/log/manila/readme.txt

View File

@ -199,11 +199,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- /var/log/containers/openvswitch
- /var/lib/openvswitch/ovn
- { 'path': /var/log/containers/openvswitch, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/openvswitch/ovn, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/openvswitch, 'setype': svirt_sandbox_file_t }
- name: openvswitch logs readme
copy:
dest: /var/log/openvswitch/readme.txt

View File

@ -254,11 +254,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- /var/lib/rabbitmq
- /var/log/containers/rabbitmq
- { 'path': /var/lib/rabbitmq, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/rabbitmq, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/rabbitmq, 'setype': svirt_sandbox_file_t }
- name: rabbitmq logs readme
copy:
dest: /var/log/rabbitmq/readme.txt

View File

@ -107,13 +107,15 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- /var/log/containers/qdrouterd
- /var/lib/qdrouterd
- { 'path': /var/log/containers/qdrouterd, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/qdrouterd, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/qdrouterd, 'setype': svirt_sandbox_file_t }
- name: qrouterd logs readme
copy:
dest: /var/log/qrouterd/readme.txt

View File

@ -212,11 +212,13 @@ outputs:
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- /var/log/containers/rabbitmq
- /var/lib/rabbitmq
- { 'path': /var/log/containers/rabbitmq, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/rabbitmq, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/rabbitmq, 'setype': svirt_sandbox_file_t }
- name: rabbitmq logs readme
copy:
dest: /var/log/rabbitmq/readme.txt

View File

@ -129,14 +129,15 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create /var/lib/sahara
- name: create persistent directories
file:
path: /var/lib/sahara
state: directory
- name: create persistent sahara logs directory
file:
path: /var/log/containers/sahara
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/sahara, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/sahara, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/sahara, 'setype': svirt_sandbox_file_t }
- name: sahara logs readme
copy:
dest: /var/log/sahara/readme.txt

View File

@ -121,14 +121,15 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create /var/lib/sahara
- name: create persistent directories
file:
path: /var/lib/sahara
state: directory
- name: create persistent sahara logs directory
file:
path: /var/log/containers/sahara
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/sahara, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/sahara, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/sahara, 'setype': svirt_sandbox_file_t }
- name: sahara logs readme
copy:
dest: /var/log/sahara/readme.txt

View File

@ -151,10 +151,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/sensu
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/sensu, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/sensu, 'setype': svirt_sandbox_file_t }
- name: sensu logs readme
copy:
dest: /var/log/sensu/readme.txt

View File

@ -133,10 +133,14 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: /var/log/containers/tacker
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/tacker, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/tacker, 'setype': svirt_sandbox_file_t }
- name: tacker logs readme
copy:
dest: /var/log/tacker/readme.txt

View File

@ -180,13 +180,15 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
- name: create persistent directories
file:
path: "{{ item }}"
path: "{{ item.path }}"
setype: "{{ item.setype }}"
state: directory
with_items:
- /var/log/containers/zaqar
- /var/log/containers/httpd/zaqar
- { 'path': /var/log/containers/zaqar, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/httpd/zaqar, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/zaqar, 'setype': svirt_sandbox_file_t }
- name: zaqar logs readme
copy:
dest: /var/log/zaqar/readme.txt