Use ansible_service_mgr fact
This patch removes some extra tasks for detecting systemd and uses the fact instead. Partial-Bug: #1640125 Change-Id: Idf2b46b0665540aa52d3be549186f6f226828906
This commit is contained in:
parent
8c32a10a69
commit
d17cd3ac7e
@ -15,11 +15,13 @@
|
||||
|
||||
- include: ironic_init_upstart.yml
|
||||
static: no
|
||||
when: pid1_name == "init"
|
||||
when:
|
||||
- ansible_service_mgr == 'upstart'
|
||||
|
||||
- include: ironic_init_systemd.yml
|
||||
static: no
|
||||
when: pid1_name == "systemd"
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
|
||||
- name: Load service
|
||||
service:
|
||||
|
@ -13,19 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Check init system
|
||||
command: cat /proc/1/comm
|
||||
changed_when: false
|
||||
register: _pid1_name
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Set the name of pid1
|
||||
set_fact:
|
||||
pid1_name: "{{ _pid1_name.stdout }}"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
|
Loading…
Reference in New Issue
Block a user