소스 검색

refine condition for doing ami fetching

if there is an entry in openshift_aws_ami_map for the group we're working on, but it's blank (ie ''), then still do the fetch
Joel Diaz 7 년 전
부모
커밋
11fd5b41ee
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      roles/openshift_aws/tasks/build_node_group.yml

+ 1 - 2
roles/openshift_aws/tasks/build_node_group.yml

@@ -3,8 +3,7 @@
 # we retrieve the latest build AMI.
 # Then set openshift_aws_ami to the ami.
 - when:
-  - openshift_aws_ami == ''
-  - openshift_aws_node_group.group not in openshift_aws_ami_map
+  - (openshift_aws_ami == '' and openshift_aws_node_group.group not in openshift_aws_ami_map) or (openshift_aws_node_group.group in openshift_aws_ami_map and openshift_aws_ami_map[openshift_aws_node_group.group] == '')
   block:
   - name: fetch recently created AMI
     ec2_ami_find: