Support role specific MessageOfTheDay
This implements support for overriding the MessageOfTheDay parameter for individual roles, so that users can set different motd text for each role. Change-Id: I113da365e685b024720753e7a09be32109c96c9e
This commit is contained in:
parent
5fb9d7ecb6
commit
b073bf76a4
@ -91,6 +91,8 @@ parameter_defaults:
|
||||
* evidence of criminal activity, system personnel may provide *
|
||||
* the evidence from such monitoring to law enforcement officials.*
|
||||
******************************************************************
|
||||
MessageOfTheDay: |
|
||||
This is a test message of MessageOfTheDay
|
||||
ControllerParameters:
|
||||
BannerText: |
|
||||
******************************************************************
|
||||
@ -102,6 +104,9 @@ parameter_defaults:
|
||||
* the evidence from such monitoring to law enforcement officials.*
|
||||
******************************************************************
|
||||
This node is a Controller node.
|
||||
MessageOfTheDay: |
|
||||
This is a test message of MessageOfTheDay
|
||||
This node is a Controller node.
|
||||
# we don't deploy Swift so we switch to file backend.
|
||||
GlanceBackend: 'file'
|
||||
IronicCleaningDiskErase: 'metadata'
|
||||
|
@ -43,6 +43,8 @@ parameter_defaults:
|
||||
* evidence of criminal activity, system personnel may provide *
|
||||
* the evidence from such monitoring to law enforcement officials.*
|
||||
******************************************************************
|
||||
MessageOfTheDay: |
|
||||
This is a test message of MessageOfTheDay
|
||||
# we don't deploy Swift so we switch to file backend.
|
||||
GlanceBackend: 'file'
|
||||
NotificationDriver: 'noop'
|
||||
|
@ -37,6 +37,8 @@ parameters:
|
||||
default: ''
|
||||
description: Configures /etc/motd text
|
||||
type: string
|
||||
tags:
|
||||
- role_specific
|
||||
SshServerOptions:
|
||||
default: {}
|
||||
description: Mapping of sshd_config values
|
||||
@ -73,7 +75,9 @@ conditions:
|
||||
- not: {equals: [{get_param: BannerText}, '']}
|
||||
- not: {equals: [{get_param: [RoleParameters, BannerText]}, '']}
|
||||
ssh_motd_text_set:
|
||||
not: {equals: [{get_param: MessageOfTheDay}, '']}
|
||||
or:
|
||||
- not: {equals: [{get_param: MessageOfTheDay}, '']}
|
||||
- not: {equals: [{get_param: [RoleParameters, MessageOfTheDay]}, '']}
|
||||
|
||||
resources:
|
||||
RoleParametersValue:
|
||||
@ -84,9 +88,11 @@ resources:
|
||||
map_replace:
|
||||
- map_replace:
|
||||
- banner_text: BannerText
|
||||
message_of_the_day: MessageOfTheDay
|
||||
- values: {get_param: [RoleParameters]}
|
||||
- values:
|
||||
BannerText: {get_param: BannerText}
|
||||
MessageOfTheDay: {get_param: MessageOfTheDay}
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
@ -119,4 +125,4 @@ outputs:
|
||||
- ssh_motd_text_set
|
||||
- true
|
||||
- false
|
||||
tripleo_sshd_message_of_the_day: {get_param: MessageOfTheDay}
|
||||
tripleo_sshd_message_of_the_day: {get_attr: [RoleParametersValue, value, message_of_the_day]}
|
||||
|
Loading…
Reference in New Issue
Block a user