diff --git a/deployment/sshd/sshd-baremetal-ansible.yaml b/deployment/sshd/sshd-baremetal-ansible.yaml index 6279737dca..dee9c78278 100644 --- a/deployment/sshd/sshd-baremetal-ansible.yaml +++ b/deployment/sshd/sshd-baremetal-ansible.yaml @@ -72,9 +72,10 @@ parameters: type: boolean conditions: - ssh_firewall_allow_all: {equals: [{get_param: SshFirewallAllowAll}, true]} - ssh_banner_text_empty: {equals: [{get_param: BannerText}, '']} - ssh_motd_text_empty: {equals: [{get_param: MessageOfTheDay}, '']} + ssh_banner_text_set: + not: {equals: [{get_param: BannerText}, '']} + ssh_motd_text_set: + not: {equals: [{get_param: MessageOfTheDay}, '']} outputs: role_data: @@ -86,7 +87,7 @@ outputs: proto: 'tcp' dport: 22 extras: - ensure: {if: [ssh_firewall_allow_all, 'present', 'absent']} + ensure: {if: [{get_param: SshFirewallAllowAll}, 'present', 'absent']} host_prep_config: - include_role: name: tripleo_ssh @@ -98,13 +99,13 @@ outputs: tripleo_sshd_password_authentication: {get_param: PasswordAuthentication} tripleo_sshd_banner_enabled: if: - - ssh_banner_text_empty + - ssh_banner_text_set - true - false tripleo_sshd_banner_text: {get_param: BannerText} tripleo_sshd_motd_enabled: if: - - ssh_motd_text_empty + - ssh_motd_text_set - true - false tripleo_sshd_message_of_the_day: {get_param: MessageOfTheDay} diff --git a/deployment/sshd/sshd-baremetal-puppet.yaml b/deployment/sshd/sshd-baremetal-puppet.yaml index 87548fbabf..13cdcb87f7 100644 --- a/deployment/sshd/sshd-baremetal-puppet.yaml +++ b/deployment/sshd/sshd-baremetal-puppet.yaml @@ -71,9 +71,6 @@ parameters: description: Set this to true to open up ssh access from all sources. type: boolean -conditions: - ssh_firewall_allow_all: {equals: [{get_param: SshFirewallAllowAll}, true]} - outputs: role_data: description: Role data for the ssh @@ -84,7 +81,7 @@ outputs: proto: 'tcp' dport: 22 extras: - ensure: {if: [ssh_firewall_allow_all, 'present', 'absent']} + ensure: {if: [{get_param: SshFirewallAllowAll}, 'present', 'absent']} config_settings: tripleo::profile::base::sshd::bannertext: {get_param: BannerText} tripleo::profile::base::sshd::motd: {get_param: MessageOfTheDay} diff --git a/deployment/timemaster/timemaster-baremetal-ansible.yaml b/deployment/timemaster/timemaster-baremetal-ansible.yaml index 4e7482d6c0..b1c6806609 100644 --- a/deployment/timemaster/timemaster-baremetal-ansible.yaml +++ b/deployment/timemaster/timemaster-baremetal-ansible.yaml @@ -119,9 +119,10 @@ resources: PTPMessageTransport: {get_param: PTPMessageTransport} conditions: - chrony_global_server_settings_is_empty: {equals: [{get_param: ChronyGlobalServerOptions}, '']} - chrony_global_pool_settings_is_empty: {equals: [{get_param: ChronyGlobalPoolOptions}, '']} - ntp_iburst: {equals: [{get_param: NtpIburstEnable}, true]} + chrony_global_server_settings_set: + not: {equals: [{get_param: ChronyGlobalServerOptions}, '']} + chrony_global_pool_settings_set: + not: {equals: [{get_param: ChronyGlobalPoolOptions}, '']} outputs: role_data: @@ -139,32 +140,32 @@ outputs: tripleo_timemaster_role_action: all chrony_global_server_settings: if: - - chrony_global_server_settings_is_empty + - chrony_global_server_settings_set + - {get_param: ChronyGlobalServerOptions} - str_replace: template: IBURST minpoll MINPOLL maxpoll MAXPOLL params: IBURST: if: - - ntp_iburst + - {get_param: NtpIburstEnable} - iburst - '' MINPOLL: { get_param: MinPoll } MAXPOLL: { get_param: MaxPoll } - - {get_param: ChronyGlobalServerOptions} chrony_global_pool_settings: if: - - chrony_global_pool_settings_is_empty + - chrony_global_pool_settings_set + - {get_param: ChronyGlobalPoolOptions} - str_replace: template: IBURST minpoll MINPOLL maxpoll MAXPOLL params: IBURST: if: - - ntp_iburst + - {get_param: NtpIburstEnable} - iburst - '' MINPOLL: { get_param: MinPoll } MAXPOLL: { get_param: MaxPoll } - - {get_param: ChronyGlobalPoolOptions} chrony_manage_package: {get_param: EnablePackageInstall} chrony_acl_rules: {get_param: ChronyAclRules} ptp_interfaces: {get_attr: [RoleParametersValue, value, tripleo_ptp_interfaces]} diff --git a/deployment/timesync/chrony-baremetal-ansible.yaml b/deployment/timesync/chrony-baremetal-ansible.yaml index 399c8e2452..dc6692f4ba 100644 --- a/deployment/timesync/chrony-baremetal-ansible.yaml +++ b/deployment/timesync/chrony-baremetal-ansible.yaml @@ -89,9 +89,10 @@ parameters: type: comma_delimited_list conditions: - chrony_global_server_settings_is_empty: {equals: [{get_param: ChronyGlobalServerOptions}, '']} - chrony_global_pool_settings_is_empty: {equals: [{get_param: ChronyGlobalPoolOptions}, '']} - ntp_iburst: {equals: [{get_param: NtpIburstEnable}, true]} + chrony_global_server_settings_set: + not: {equals: [{get_param: ChronyGlobalServerOptions}, '']} + chrony_global_pool_settings_set: + not: {equals: [{get_param: ChronyGlobalPoolOptions}, '']} outputs: role_data: @@ -127,31 +128,31 @@ outputs: chrony_ntp_pools: {get_param: NtpPool} chrony_global_server_settings: if: - - chrony_global_server_settings_is_empty + - chrony_global_server_settings_set + - {get_param: ChronyGlobalServerOptions} - str_replace: template: IBURST minpoll MINPOLL maxpoll MAXPOLL params: IBURST: if: - - ntp_iburst + - {get_param: NtpIburstEnable} - iburst - '' MINPOLL: { get_param: MinPoll } MAXPOLL: { get_param: MaxPoll } - - {get_param: ChronyGlobalServerOptions} chrony_global_pool_settings: if: - - chrony_global_pool_settings_is_empty + - chrony_global_pool_settings_set + - {get_param: ChronyGlobalPoolOptions} - str_replace: template: IBURST minpoll MINPOLL maxpoll MAXPOLL params: IBURST: if: - - ntp_iburst + - {get_param: NtpIburstEnable} - iburst - '' MINPOLL: { get_param: MinPoll } MAXPOLL: { get_param: MaxPoll } - - {get_param: ChronyGlobalPoolOptions} chrony_manage_package: {get_param: EnablePackageInstall} chrony_acl_rules: {get_param: ChronyAclRules}