Merge "Use masakari_log_dir consistently"
This commit is contained in:
commit
1618673f02
|
@ -33,7 +33,7 @@
|
|||
|
||||
- name: Create masakari dir
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
path: "{{ item.path | realpath }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner|default(masakari_system_user_name) }}"
|
||||
group: "{{ item.group|default(masakari_system_group_name) }}"
|
||||
|
@ -41,29 +41,8 @@
|
|||
with_items:
|
||||
- { path: "/openstack", mode: "0755", owner: "root", group: "root" }
|
||||
- { path: "{{ masakari_etc_dir }}", mode: "0750" }
|
||||
- { path: "/var/cache/masakari" }
|
||||
- { path: "{{ masakari_log_dir }}", mode: "0755" }
|
||||
- { path: "{{ masakari_system_user_home }}" }
|
||||
- { path: "{{ masakari_system_user_home }}/cache/api", mode: "0700" }
|
||||
- { path: "{{ masakari_system_user_home }}/cache/registry" }
|
||||
- { path: "{{ masakari_system_user_home }}/scrubber" }
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
if [ -h "/var/log/masakari" ]; then
|
||||
chown -h {{ masakari_system_user_name }}:{{ masakari_system_group_name }} "/var/log/masakari"
|
||||
chown -R {{ masakari_system_user_name }}:{{ masakari_system_group_name }} "$(readlink /var/log/masakari)"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
register: log_dir
|
||||
failed_when: false
|
||||
changed_when: log_dir.rc != 0
|
||||
|
||||
- name: Create masakari log dir
|
||||
file:
|
||||
path: "/var/log/masakari"
|
||||
state: directory
|
||||
owner: "{{ masakari_system_user_name }}"
|
||||
group: "{{ masakari_system_group_name }}"
|
||||
mode: "0755"
|
||||
when: log_dir.rc != 0
|
||||
|
|
|
@ -11,9 +11,9 @@ User={{ masakari_system_user_name }}
|
|||
Group={{ masakari_system_group_name }}
|
||||
|
||||
{% if item.value.program_override is defined %}
|
||||
ExecStart={{ item.value.program_override }} {{ item.value.program_config_options|default('') }} {{ item.value.log_string | default('--log-file=') }}/var/log/masakari/{{ item.value.service_name }}.log
|
||||
ExecStart={{ item.value.program_override }} {{ item.value.program_config_options|default('') }} {{ item.value.log_string | default('--log-file=') }}/{{ masakari_log_dir }}/{{ item.value.service_name }}.log
|
||||
{% else %}
|
||||
ExecStart={{ masakari_bin }}/{{ item.value.service_name }} {{ item.value.program_config_options|default('') }} --log-file=/var/log/masakari/{{ item.value.service_name }}.log
|
||||
ExecStart={{ masakari_bin }}/{{ item.value.service_name }} {{ item.value.program_config_options|default('') }} --log-file={{ masakari_log_dir }}/{{ item.value.service_name }}.log
|
||||
{% endif %}
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
|
|
|
@ -7,7 +7,7 @@ masakari_api_listen = 0.0.0.0
|
|||
masakari_api_listen_port = 15868
|
||||
debug = False
|
||||
auth_strategy=keystone
|
||||
log_dir = /var/log/masakari
|
||||
log_dir = {{ masakari_log_dir }}
|
||||
wait_period_after_service_update = 180
|
||||
masakari_topic = ha_engine
|
||||
engine_manager = masakari.engine.manager.MasakariManager
|
||||
|
|
Loading…
Reference in New Issue