Stop supporting non-systemd systems

All currently supported systems use systemd, so let's simplify
the templates.

Change-Id: I66dfeedbff76bd2acd843b9ccffe8c79bc40391b
This commit is contained in:
Dmitry Tantsur 2020-06-03 09:07:54 +02:00
parent 508899cc6b
commit 6f44cd8c31
16 changed files with 14 additions and 31 deletions

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /lib/systemd/system/
init_ext: .service
ipxe_dir: /usr/lib/ipxe/
ipxe_full_binary: ipxe.pxe
ironic_rootwrap_dir: /usr/local/bin/

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /usr/lib/systemd/system/
init_ext: .service
ipxe_dir: /usr/share/ipxe/
ipxe_full_binary: ipxe.lkrn
ironic_rootwrap_dir: /usr/bin/

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /usr/lib/systemd/system/
init_ext: .service
ipxe_dir: /usr/share/ipxe/
ipxe_full_binary: ipxe.lkrn
ipxe_efi_binary: ipxe-x86_64.efi

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /usr/lib/systemd/system/
init_ext: .service
# NOTE (cinerama): The iPXE binaries are not currently packaged for SuSE,
# so we download them and install them to /usr/local/share/ipxe. If the
# files are packaged, download_ipxe can be removed and ipxe_dir set to

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /lib/systemd/system/
init_ext: .service
required_packages:
- mariadb-server
- python3-dev

View File

@ -153,12 +153,11 @@
ironic.database.host != 'localhost' or
test_created_db.changed | bool == false
- name: "Create service folder if systemd template is defined"
- name: "Create service folder"
file:
path: "{{ init_dest_dir }}"
state: directory
mode: 0755
when: init_template == 'systemd_template.j2'
- name: "Install ironic-inspector to permit use of inspection interface"
include: inspector_bootstrap.yml
@ -183,8 +182,8 @@
- name: "Place ironic services on Debian family"
template:
src: "{{ init_template }}"
dest: "{{ init_dest_dir }}{{ item.service_name }}{{ init_ext }}"
src: systemd_template.j2
dest: "{{ init_dest_dir }}{{ item.service_name }}.service"
owner: "root"
group: "root"
with_items:
@ -195,8 +194,8 @@
- name: "Place ironic services on RedHat family"
template:
src: "{{ init_template }}"
dest: "{{ init_dest_dir }}{{ item.service_name }}{{ init_ext }}"
src: systemd_template.j2
dest: "{{ init_dest_dir }}{{ item.service_name }}.service"
owner: "root"
group: "root"
with_items:

View File

@ -96,7 +96,11 @@
register: ironic_install_prefix
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
- name: "Inspector - Place service"
template: src={{ init_template }} dest={{ init_dest_dir }}{{item.service_name}}{{ init_ext }} owner=root group=root
template:
src: systemd_template.j2
dest: "{{ init_dest_dir }}{{item.service_name}}.service"
owner: root
group: root
with_items:
- { service_path: "{{ ironic_install_prefix.stdout | default('') }}", service_name: 'ironic-inspector', username: 'ironic', args: '--config-file /etc/ironic-inspector/inspector.conf'}
- name: "Inspector - Explicitly permit TCP/5050 for ironic-inspector callback"

View File

@ -15,7 +15,6 @@
---
- name: "Reload systemd configuration"
command: systemctl daemon-reload
when: init_template == 'systemd_template.j2'
- name: "Ensure rsyslog is running with current config"
service: name=rsyslog state=restarted

View File

@ -7,4 +7,4 @@ User={{ item.username }}
[Install]
WantedBy=multi-user.target
Alias={{ item.service_name }}{{ init_ext }}
Alias={{ item.service_name }}.service

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /lib/systemd/system/
init_ext: .service
nginx_user: www-data
mysql_service_name: mysql
required_packages:

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /usr/lib/systemd/system/
init_ext: .service
ipxe_dir: /usr/share/ipxe/
ipxe_full_binary: ipxe.lkrn
ipxe_efi_binary: ipxe-x86_64.efi

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /usr/lib/systemd/system/
init_ext: .service
mysql_service_name: mysql
required_packages:
- python-selinux

View File

@ -1,7 +1,5 @@
---
init_template: systemd_template.j2
init_dest_dir: /lib/systemd/system/
init_ext: .service
required_packages:
- mariadb-server
- python3-dev

View File

@ -269,8 +269,8 @@
- name: "Place uwsgi services"
template:
src: "{{ init_template }}"
dest: "{{ init_dest_dir }}{{ item.service_name }}{{ init_ext }}"
src: systemd_template.j2
dest: "{{ init_dest_dir }}{{ item.service_name }}.service"
owner: "root"
group: "root"
with_items:

View File

@ -13,7 +13,6 @@
---
- name: "Reload systemd configuration"
command: systemctl daemon-reload
when: init_template == 'systemd_template.j2'
- name: "Ensure services are running with current config"
service: name={{ item }} state=restarted enabled=yes

View File

@ -12,4 +12,4 @@ User={{ item.username }}
[Install]
WantedBy=multi-user.target
Alias={{ item.service_name }}{{ init_ext }}
Alias={{ item.service_name }}.service