diff --git a/defaults/main.yml b/defaults/main.yml index 054406e..235a50e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -141,6 +141,7 @@ tacker_pip_packages: - PyMySQL - python-heatclient - python-tackerclient + - systemd-python - tacker tacker_config_options: --config-file {{ tacker_etc_dir }}/tacker.conf diff --git a/tasks/main.yml b/tasks/main.yml index f757c46..d3ed69f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -101,7 +101,7 @@ - service_name: "{{ tacker_service_name }}" enabled: yes state: started - execstarts: "{{ tacker_bin }}/{{ tacker_program_name }} {{ tacker_config_options|default('') }} --log-file=/var/log/tacker/{{ tacker_program_name }}.log" + execstarts: "{{ tacker_bin }}/{{ tacker_program_name }} {{ tacker_config_options|default('') }}" config_overrides: "{{ tacker_init_config_overrides }}" tags: - systemd-service diff --git a/tasks/tacker_pre_install.yml b/tasks/tacker_pre_install.yml index ea40a38..e9b4c86 100644 --- a/tasks/tacker_pre_install.yml +++ b/tasks/tacker_pre_install.yml @@ -49,39 +49,3 @@ - path: "{{ tacker_etc_dir }}/rootwrap.d" owner: "root" group: "root" - - -#- name: Create tacker venv dir - #file: - #path: "{{ item.path }}" - #state: directory - #with_items: - #- { path: "/openstack/venvs" } - #- { path: "{{ tacker_venv_bin }}" } - #when: tacker_venv_enabled | bool - #tags: - #- tacker-dirs - -- name: Test for log directory or link - shell: | - if [ -h "/var/log/tacker" ]; then - chown -h {{ tacker_system_user_name }}:{{ tacker_system_group_name }} "/var/log/tacker" - chown -R {{ tacker_system_user_name }}:{{ tacker_system_group_name }} "$(readlink /var/log/tacker)" - else - exit 1 - fi - register: log_dir - failed_when: false - changed_when: log_dir.rc != 0 - -- name: Create tacker log dir - file: - path: "{{ item.path }}" - state: directory - owner: "{{ item.owner|default(tacker_system_user_name) }}" - group: "{{ item.group|default(tacker_system_group_name) }}" - mode: "{{ item.mode|default('0755') }}" - with_items: - - { path: "/var/log/tacker" } - when: log_dir.rc != 0 - diff --git a/templates/tacker.conf.j2 b/templates/tacker.conf.j2 index e4f56a3..a96458d 100644 --- a/templates/tacker.conf.j2 +++ b/templates/tacker.conf.j2 @@ -25,6 +25,7 @@ policy_file = {{ tacker_etc_dir }}/policy.json # (not user_stderr) and (not log_file) -> stdout # publish_errors -> notification system +use_journal = True use_syslog = False # syslog_log_facility = LOG_USER diff --git a/vars/debian.yml b/vars/debian.yml index 4906bc1..7e9b512 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -21,7 +21,4 @@ cache_timeout: 600 tacker_distro_packages: - rsync - git - #- remove after testing - - python-pip - #- remove after testing - - python-mysqldb + - libsystemd-dev diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 500b7ea..30db100 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -14,3 +14,4 @@ tacker_distro_packages: - rsync - git-core + - systemd-devel diff --git a/vars/suse.yml b/vars/suse.yml index face74a..1c04f38 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -16,3 +16,4 @@ tacker_distro_packages: - rsync - git-core + - systemd-devel