diff --git a/deploy/definitions/opsworks_deploy_user.rb b/deploy/definitions/opsworks_deploy_user.rb index c294fe79e4..3926790692 100644 --- a/deploy/definitions/opsworks_deploy_user.rb +++ b/deploy/definitions/opsworks_deploy_user.rb @@ -1,7 +1,13 @@ define :opsworks_deploy_user do deploy = params[:deploy_data] - group deploy[:group] + group deploy[:group] do + not_if do + existing_groups = [] + Etc.group {|group| existing_groups << group['name']} + existing_groups.include?(deploy[:group]) + end + end user deploy[:user] do action :create