Merge "Use json formatter for feature_flags fetcher"
This commit is contained in:
1 changed files with 7 additions and 10 deletions
@@ -24,20 +24,17 @@
- name:"Only enable feature flags if all cluster members are up and stable"
block:
- name:"Check for disabled RabbitMQ feature flags"
shell:"rabbitmqctl list_feature_flags | grep disabled"
args:
executable:/bin/bash
command:"rabbitmqctl list_feature_flags --formatter json name state stability"
register:_feature_flags
changed_when:False
failed_when:False
# NOTE: changed_when required despite the above check because 'unstable'
# featureflags will remain disabled each time this runs
- name:"Enable all RabbitMQ feature flags"
command:"rabbitmqctl enable_feature_flag all"
changed_when:False
when:
- (_feature_flags.stdout_lines | length) > 0
- name:"Enable missing RabbitMQ feature flags"
command:"rabbitmqctl enable_feature_flag {{ flag['name'] }}"
changed_when:True
loop:"{{ _feature_flags.stdout | from_json | rejectattr('stability', 'eq', 'experimental') | selectattr('state', 'eq', 'disabled') }}"
loop_control:
loop_var:flag
when:
- _cluster_status.rc == 0
- ((_cluster_status.stdout | from_json)['running_nodes'] | length) == (groups[rabbitmq_host_group] | length)
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.