a new variable in vars ansible_init

add a variable that takes the value of the initialization

http://docs.ansible.com/ansible/playbooks_variables.html

“ansible_init”: “systemd”,
“ansible_init”: “SysV”,

“ansible_init”: “OpenRC”,

or

“ansible_init”: {
“systemd”: true,

“SysV”: true,

“OpenRC”: false
}

I was going with: ansible_service_mgr

  1. I took the test for the devel branch
    https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/service.py
    after
    ansible hostname -m setup
    this variable is not present
    Are there any conditions to create a variable?

  2. Partly I needed to branch the code in the playbook.

  1. Partly I needed to branch the code in the playbook.
- name: check systemd
  shell: "cat /proc/1/comm"
  ignore_errors: yes
  register: ansible_init

- include: 'systemd_setup.yml'
  when: ansible_init.stdout.find('systemd') != -1

Your module does not do what I need.
I need a variable to the current system initialization.