Add undercloud_enable_selinux
Expose selinux configuration via the undercloud.conf Change-Id: I6973fec9bcc55373f89e5c873ff6ae7050fff432 Depends-On: I2109bf62e307df92b6bdb57600c58dd61482f46d Partial-Bug: #1779005
This commit is contained in:
parent
e70d027d53
commit
4aa679e960
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add `undercloud_enable_selinux` configuration to the undercloud.conf.
|
||||||
|
This option is a boolean option to enable or disable SELinux during the
|
||||||
|
undercloud installation.
|
@ -250,6 +250,10 @@ class UndercloudConfig(StandaloneConfig):
|
|||||||
'Whether to enable the debug log level for '
|
'Whether to enable the debug log level for '
|
||||||
'Undercloud OpenStack services.')
|
'Undercloud OpenStack services.')
|
||||||
),
|
),
|
||||||
|
cfg.BoolOpt('undercloud_enable_selinux',
|
||||||
|
default=True,
|
||||||
|
help=_('Enable or disable SELinux during the '
|
||||||
|
'deployment.')),
|
||||||
cfg.BoolOpt('undercloud_update_packages',
|
cfg.BoolOpt('undercloud_update_packages',
|
||||||
default=False,
|
default=False,
|
||||||
help=_(
|
help=_(
|
||||||
|
@ -61,6 +61,7 @@ class TestUndercloudConfig(base.TestCase):
|
|||||||
'templates',
|
'templates',
|
||||||
'undercloud_admin_host',
|
'undercloud_admin_host',
|
||||||
'undercloud_debug',
|
'undercloud_debug',
|
||||||
|
'undercloud_enable_selinux',
|
||||||
'undercloud_hostname',
|
'undercloud_hostname',
|
||||||
'undercloud_log_file',
|
'undercloud_log_file',
|
||||||
'undercloud_nameservers',
|
'undercloud_nameservers',
|
||||||
@ -119,6 +120,7 @@ class TestUndercloudConfig(base.TestCase):
|
|||||||
'templates',
|
'templates',
|
||||||
'undercloud_admin_host',
|
'undercloud_admin_host',
|
||||||
'undercloud_debug',
|
'undercloud_debug',
|
||||||
|
'undercloud_enable_selinux',
|
||||||
'undercloud_hostname',
|
'undercloud_hostname',
|
||||||
'undercloud_log_file',
|
'undercloud_log_file',
|
||||||
'undercloud_nameservers',
|
'undercloud_nameservers',
|
||||||
|
@ -284,6 +284,11 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False,
|
|||||||
# Parse the undercloud.conf options to include necessary args and
|
# Parse the undercloud.conf options to include necessary args and
|
||||||
# yaml files for undercloud deploy command
|
# yaml files for undercloud deploy command
|
||||||
|
|
||||||
|
if CONF.get('undercloud_enable_selinux'):
|
||||||
|
env_data['SELinuxMode'] = 'enforcing'
|
||||||
|
else:
|
||||||
|
env_data['SELinuxMode'] = 'permissive'
|
||||||
|
|
||||||
if CONF.get('undercloud_ntp_servers', None):
|
if CONF.get('undercloud_ntp_servers', None):
|
||||||
env_data['NtpServer'] = CONF['undercloud_ntp_servers'][0]
|
env_data['NtpServer'] = CONF['undercloud_ntp_servers'][0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user