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:
parent
508899cc6b
commit
6f44cd8c31
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /lib/systemd/system/
|
init_dest_dir: /lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
ipxe_dir: /usr/lib/ipxe/
|
ipxe_dir: /usr/lib/ipxe/
|
||||||
ipxe_full_binary: ipxe.pxe
|
ipxe_full_binary: ipxe.pxe
|
||||||
ironic_rootwrap_dir: /usr/local/bin/
|
ironic_rootwrap_dir: /usr/local/bin/
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /usr/lib/systemd/system/
|
init_dest_dir: /usr/lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
ipxe_dir: /usr/share/ipxe/
|
ipxe_dir: /usr/share/ipxe/
|
||||||
ipxe_full_binary: ipxe.lkrn
|
ipxe_full_binary: ipxe.lkrn
|
||||||
ironic_rootwrap_dir: /usr/bin/
|
ironic_rootwrap_dir: /usr/bin/
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /usr/lib/systemd/system/
|
init_dest_dir: /usr/lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
ipxe_dir: /usr/share/ipxe/
|
ipxe_dir: /usr/share/ipxe/
|
||||||
ipxe_full_binary: ipxe.lkrn
|
ipxe_full_binary: ipxe.lkrn
|
||||||
ipxe_efi_binary: ipxe-x86_64.efi
|
ipxe_efi_binary: ipxe-x86_64.efi
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /usr/lib/systemd/system/
|
init_dest_dir: /usr/lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
# NOTE (cinerama): The iPXE binaries are not currently packaged for SuSE,
|
# 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
|
# 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
|
# files are packaged, download_ipxe can be removed and ipxe_dir set to
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /lib/systemd/system/
|
init_dest_dir: /lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
required_packages:
|
required_packages:
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- python3-dev
|
- python3-dev
|
||||||
|
@ -153,12 +153,11 @@
|
|||||||
ironic.database.host != 'localhost' or
|
ironic.database.host != 'localhost' or
|
||||||
test_created_db.changed | bool == false
|
test_created_db.changed | bool == false
|
||||||
|
|
||||||
- name: "Create service folder if systemd template is defined"
|
- name: "Create service folder"
|
||||||
file:
|
file:
|
||||||
path: "{{ init_dest_dir }}"
|
path: "{{ init_dest_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: init_template == 'systemd_template.j2'
|
|
||||||
|
|
||||||
- name: "Install ironic-inspector to permit use of inspection interface"
|
- name: "Install ironic-inspector to permit use of inspection interface"
|
||||||
include: inspector_bootstrap.yml
|
include: inspector_bootstrap.yml
|
||||||
@ -183,8 +182,8 @@
|
|||||||
|
|
||||||
- name: "Place ironic services on Debian family"
|
- name: "Place ironic services on Debian family"
|
||||||
template:
|
template:
|
||||||
src: "{{ init_template }}"
|
src: systemd_template.j2
|
||||||
dest: "{{ init_dest_dir }}{{ item.service_name }}{{ init_ext }}"
|
dest: "{{ init_dest_dir }}{{ item.service_name }}.service"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
with_items:
|
with_items:
|
||||||
@ -195,8 +194,8 @@
|
|||||||
|
|
||||||
- name: "Place ironic services on RedHat family"
|
- name: "Place ironic services on RedHat family"
|
||||||
template:
|
template:
|
||||||
src: "{{ init_template }}"
|
src: systemd_template.j2
|
||||||
dest: "{{ init_dest_dir }}{{ item.service_name }}{{ init_ext }}"
|
dest: "{{ init_dest_dir }}{{ item.service_name }}.service"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -96,7 +96,11 @@
|
|||||||
register: ironic_install_prefix
|
register: ironic_install_prefix
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
||||||
- name: "Inspector - Place service"
|
- 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:
|
with_items:
|
||||||
- { service_path: "{{ ironic_install_prefix.stdout | default('') }}", service_name: 'ironic-inspector', username: 'ironic', args: '--config-file /etc/ironic-inspector/inspector.conf'}
|
- { 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"
|
- name: "Inspector - Explicitly permit TCP/5050 for ironic-inspector callback"
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
---
|
---
|
||||||
- name: "Reload systemd configuration"
|
- name: "Reload systemd configuration"
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
when: init_template == 'systemd_template.j2'
|
|
||||||
|
|
||||||
- name: "Ensure rsyslog is running with current config"
|
- name: "Ensure rsyslog is running with current config"
|
||||||
service: name=rsyslog state=restarted
|
service: name=rsyslog state=restarted
|
||||||
|
@ -7,4 +7,4 @@ User={{ item.username }}
|
|||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
Alias={{ item.service_name }}{{ init_ext }}
|
Alias={{ item.service_name }}.service
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /lib/systemd/system/
|
init_dest_dir: /lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
nginx_user: www-data
|
nginx_user: www-data
|
||||||
mysql_service_name: mysql
|
mysql_service_name: mysql
|
||||||
required_packages:
|
required_packages:
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /usr/lib/systemd/system/
|
init_dest_dir: /usr/lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
ipxe_dir: /usr/share/ipxe/
|
ipxe_dir: /usr/share/ipxe/
|
||||||
ipxe_full_binary: ipxe.lkrn
|
ipxe_full_binary: ipxe.lkrn
|
||||||
ipxe_efi_binary: ipxe-x86_64.efi
|
ipxe_efi_binary: ipxe-x86_64.efi
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /usr/lib/systemd/system/
|
init_dest_dir: /usr/lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
mysql_service_name: mysql
|
mysql_service_name: mysql
|
||||||
required_packages:
|
required_packages:
|
||||||
- python-selinux
|
- python-selinux
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
init_template: systemd_template.j2
|
|
||||||
init_dest_dir: /lib/systemd/system/
|
init_dest_dir: /lib/systemd/system/
|
||||||
init_ext: .service
|
|
||||||
required_packages:
|
required_packages:
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- python3-dev
|
- python3-dev
|
||||||
|
@ -269,8 +269,8 @@
|
|||||||
|
|
||||||
- name: "Place uwsgi services"
|
- name: "Place uwsgi services"
|
||||||
template:
|
template:
|
||||||
src: "{{ init_template }}"
|
src: systemd_template.j2
|
||||||
dest: "{{ init_dest_dir }}{{ item.service_name }}{{ init_ext }}"
|
dest: "{{ init_dest_dir }}{{ item.service_name }}.service"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
---
|
---
|
||||||
- name: "Reload systemd configuration"
|
- name: "Reload systemd configuration"
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
when: init_template == 'systemd_template.j2'
|
|
||||||
|
|
||||||
- name: "Ensure services are running with current config"
|
- name: "Ensure services are running with current config"
|
||||||
service: name={{ item }} state=restarted enabled=yes
|
service: name={{ item }} state=restarted enabled=yes
|
||||||
|
@ -12,4 +12,4 @@ User={{ item.username }}
|
|||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
Alias={{ item.service_name }}{{ init_ext }}
|
Alias={{ item.service_name }}.service
|
||||||
|
Loading…
Reference in New Issue
Block a user