Deprecate systemd_lock_path variable
To remove complexity from the code we remove variable systemd_lock_path since variable systemd_lock_dir with common functionality has been introduced. Change-Id: I61bb44450a7fb1cface2b93302e02c8fd358a034
This commit is contained in:
parent
46185f389e
commit
a3800b6368
@ -72,11 +72,6 @@ systemd_run_dir: "/run"
|
||||
# This option can also be defined for specific service entries under "systemd_services".
|
||||
systemd_lock_dir: "/run/lock"
|
||||
|
||||
# Global lock path used for system services.
|
||||
# This is an optional variable and will have no effect if undefined.
|
||||
# This option can also be defined for specific service entries under "systemd_services".
|
||||
# systemd_lock_path: "/var/lock/service1"
|
||||
|
||||
# Global Environment variables for system services.
|
||||
# This option will provide the operator a way to set additional environment options
|
||||
# used within the execution of a given service. Environment variables can be passed
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
Variable ``systemd_lock_path`` has been dropped and has no effect now.
|
||||
In order to customize lock dir path please use ``systemd_lock_dir``.
|
||||
Please keep in mind, that for ``systemd_lock_dir`` you don't need to
|
||||
provide full path like it was with ``systemd_lock_path`` since service
|
||||
name is added to the end of the path.
|
@ -47,23 +47,6 @@
|
||||
group: "{{ item.systemd_group_name | default(systemd_group_name) }}"
|
||||
mode: "02755"
|
||||
with_items: "{{ systemd_services }}"
|
||||
when:
|
||||
- (item.systemd_lock_path is not defined) and
|
||||
(systemd_lock_path is not defined)
|
||||
tags:
|
||||
- systemd-service
|
||||
|
||||
- name: Create TEMP defined lock path
|
||||
file:
|
||||
path: "{{ item.systemd_lock_path | default(systemd_lock_path) }}"
|
||||
state: directory
|
||||
owner: "{{ item.systemd_user_name | default(systemd_user_name) }}"
|
||||
group: "{{ item.systemd_group_name | default(systemd_group_name) }}"
|
||||
mode: "02755"
|
||||
when:
|
||||
- (item.systemd_lock_path is defined) or
|
||||
(systemd_lock_path is defined)
|
||||
with_items: "{{ systemd_services }}"
|
||||
tags:
|
||||
- systemd-service
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% if (item.systemd_lock_path is defined) or (systemd_lock_path is defined) %}
|
||||
D {{ item.systemd_lock_path | default(systemd_lock_path) }} 2755 {{ item.systemd_user_name | default(systemd_user_name) }} {{ item.systemd_group_name | default(systemd_group_name) }}
|
||||
D {{ (item.systemd_lock_path | default(systemd_lock_path)) | replace('lock', 'run') }} 2755 {{ item.systemd_user_name | default(systemd_user_name) }} {{ item.systemd_group_name | default(systemd_group_name) }}
|
||||
{% else %}
|
||||
D {{ item.systemd_lock_dir | default(systemd_lock_dir) }}/{{ item.service_name | replace(' ', '_') }} 2755 {{ item.systemd_user_name | default(systemd_user_name) }} {{ item.systemd_group_name | default(systemd_group_name) }}
|
||||
D {{ item.systemd_run_dir | default(systemd_run_dir) }}/{{ item.service_name | replace(' ', '_') }} 2755 {{ item.systemd_user_name | default(systemd_user_name) }} {{ item.systemd_group_name | default(systemd_group_name) }}
|
||||
{% endif %}
|
||||
|
@ -48,7 +48,6 @@
|
||||
enabled: yes
|
||||
state: started
|
||||
systemd_tempd_prefix: openstack
|
||||
systemd_lock_path: /var/lock/networking
|
||||
- service_name: "test timer service0"
|
||||
execstarts:
|
||||
- "/bin/bash -c 'echo start0'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user