From d6c0979eb3de79b8c3a79ea5798498f0241eb32d Mon Sep 17 00:00:00 2001 From: James Slagle Date: Fri, 16 Jun 2017 11:13:25 -0400 Subject: Blacklist support for ExtraConfig Commit I46941e54a476c7cc8645cd1aff391c9c6c5434de added support for blacklisting servers from triggered Heat deployments. This commit adds that functionality to the remaining Deployments in tripleo-heat-templates for the ExtraConfig interfaces. Since we can not (should not) change the interface to ExtraConfig, Heat conditions are used on the actual ExtraConfigPre and NodeExtraConfig resources instead of using the actions approach on Deployments. Change-Id: I38fdb50d1d966a6c3651980c52298317fa3bece4 --- puppet/role.role.j2.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'puppet/role.role.j2.yaml') diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml index b7f47594..266657c8 100644 --- a/puppet/role.role.j2.yaml +++ b/puppet/role.role.j2.yaml @@ -399,6 +399,7 @@ resources: properties: server: {get_resource: {{role}}} RoleParameters: {get_param: RoleParameters} + deployment_actions: {get_attr: [DeploymentActions, value]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -511,6 +512,9 @@ resources: {{role}}ExtraConfigPre: depends_on: {{role}}Deployment type: OS::TripleO::{{role}}ExtraConfigPre + # We have to use conditions here so that we don't break backwards + # compatibility with templates everywhere + condition: server_not_blacklisted properties: server: {get_resource: {{role}}} @@ -519,6 +523,9 @@ resources: NodeExtraConfig: depends_on: [{{role}}ExtraConfigPre, NodeTLSCAData] type: OS::TripleO::NodeExtraConfig + # We have to use conditions here so that we don't break backwards + # compatibility with templates everywhere + condition: server_not_blacklisted properties: server: {get_resource: {{role}}} @@ -541,11 +548,21 @@ resources: - ['CREATE', 'UPDATE'] - [] + DeploymentActions: + type: OS::Heat::Value + properties: + value: + if: + - server_not_blacklisted + - ['CREATE', 'UPDATE'] + - [] + SshHostPubKey: type: OS::TripleO::Ssh::HostPubKey depends_on: {{role}}Deployment properties: server: {get_resource: {{role}}} + deployment_actions: {get_attr: [DeploymentActions, value]} outputs: ip_address: -- cgit 1.2.3-korg