Skip to content

Commit

Permalink
[FIX] Add ability to ignore deprecated AMI (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
dipiazzg authored Oct 27, 2022
1 parent 2d3691c commit b848701
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions EXAMPLE/cluster_defs/cluster_vars.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---

override_deprecated_ami: true # If set true will prevent the playbook to fail in case any of the existing VM has a deprecated AMI.

redeploy_schemes_supported: ['_scheme_addallnew_rmdisk_rollback', '_scheme_addnewvm_rmdisk_rollback', '_scheme_rmvm_rmdisk_only', '_scheme_rmvm_keepdisk_rollback', '_noredeploy_scale_in_only']

#redeploy_scheme: _scheme_addallnew_rmdisk_rollback
Expand Down
2 changes: 1 addition & 1 deletion cluster_hosts/tasks/get_cluster_hosts_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- warn_str: msg="get_cluster_hosts_target | Replaced some base images to ensure consistency across hosttype. {{cluster_hosts_target | symmetric_difference(__orig_cluster_hosts_target)}}"
when: (cluster_hosts_target | symmetric_difference(__orig_cluster_hosts_target))
when: (cluster_hosts_state | json_query('[?tagslabels.lifecycle_state==\'current\']') | length)
when: (cluster_hosts_state | json_query('[?tagslabels.lifecycle_state==\'current\']') | length and not override_deprecated_ami | bool)


- name: get_cluster_hosts_target | Augment with cloud-specific parameters (if necessary)
Expand Down

0 comments on commit b848701

Please sign in to comment.