ansible/configs/ocp4-workshop/lifecycle.yml | ●●●●● patch | view | raw | blame | history | |
ansible/lifecycle.yml | ●●●●● patch | view | raw | blame | history |
ansible/configs/ocp4-workshop/lifecycle.yml
@@ -50,7 +50,11 @@ msg: "ACTION is not defined" - name: Start / Stop VMs on AWS when: cloud_provider == 'ec2' when: - cloud_provider == 'ec2' - guid is defined - guid != '' - guid != '*' environment: AWS_ACCESS_KEY_ID: "{{aws_access_key_id}}" AWS_SECRET_ACCESS_KEY: "{{aws_secret_access_key}}" @@ -63,7 +67,8 @@ wait: no filters: "tag:guid": "{{ guid }}" "tag:env_type": "{{ env_type }}" # TODO: uncomment this in a few weeks #"tag:env_type": "{{ env_type }}" - name: Start instances by (guid, env_type) tags when: ACTION == 'start' @@ -72,7 +77,8 @@ wait: true filters: "tag:guid": "{{ guid }}" "tag:env_type": "{{ env_type }}" # TODO: uncomment this in a few weeks #"tag:env_type": "{{ env_type }}" - when: ACTION == 'status' block: @@ -80,7 +86,8 @@ ec2_instance_facts: filters: "tag:guid": "{{ guid }}" "tag:env_type": "{{ env_type }}" # TODO: uncomment this in a few weeks #"tag:env_type": "{{ env_type }}" register: r_instances - name: Print status information to a file ansible/lifecycle.yml
@@ -19,7 +19,11 @@ msg: "ACTION is not defined" when: ACTION is not defined - when: cloud_provider == 'ec2' - when: - cloud_provider == 'ec2' - guid is defined - guid != '' - guid != '*' environment: AWS_ACCESS_KEY_ID: "{{aws_access_key_id}}" AWS_SECRET_ACCESS_KEY: "{{aws_secret_access_key}}" @@ -32,7 +36,8 @@ wait: no filters: "tag:guid": "{{ guid }}" "tag:env_type": "{{ env_type }}" # TODO: uncomment this after a few weeks #"tag:env_type": "{{ env_type }}" - when: ACTION == 'start' name: Start instances by (guid, env_type) tags @@ -41,7 +46,8 @@ wait: no filters: "tag:guid": "{{ guid }}" "tag:env_type": "{{ env_type }}" # TODO: uncomment this after a few weeks #"tag:env_type": "{{ env_type }}" - when: ACTION == 'status' block: @@ -49,7 +55,8 @@ ec2_instance_facts: filters: "tag:guid": "{{ guid }}" "tag:env_type": "{{ env_type }}" # TODO: uncomment this after a few weeks #"tag:env_type": "{{ env_type }}" register: r_instances - name: Print status information to a file