-
Notifications
You must be signed in to change notification settings - Fork 2
test 09 First version tested and working #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
is there ARA recording for this test? |
kksat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a discussion in our regular meeting
ansible_collections/sap/cluster_qa/roles/test09/tasks/kill_message_server.yml
Outdated
Show resolved
Hide resolved
ansible_collections/sap/cluster_qa/roles/test09/tasks/kill_message_server.yml
Outdated
Show resolved
Hide resolved
| {{ current_ascs_host_info.instances | selectattr('mSystemNumber', 'equalto', sap_ascs_instance_number) | list }} | ||
| msg_server_process_list: >- | ||
| {{ (ascs_instance_list | first)['ProcessList'] | selectattr('name', 'equalto', 'msg_server') | list | ||
| if ascs_instance_list | length > 0 else [] }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think usual ansible approach to make sure you get list as a result is not to use if but to use ansible.builtin.default filter like so "{{ list | selectattr('name','equalto','something') | ansible.builtin.default([]) }}" - this will be [] (empty list if the first expression fails)
| ansible.builtin.set_fact: | ||
| sap_ascs_node_name_original: "{{ sap_ascs_node_name }}" | ||
|
|
||
| # ============================================================================ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to separate actions, I think comments is not the best place to do that. You might separete them into different role task files and include them like so:
- name: Prerequisite
ansible.builtin.include_tasks:
file: prerequisite.yml
| ansible.builtin.set_fact: | ||
| sap_ascs_node_name_original: "{{ sap_ascs_node_name }}" | ||
|
|
||
| # ============================================================================ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to separate actions, I think comments is not the best place to do that. You might separete them into different role task files and include them like so:
- name: Prerequisite
ansible.builtin.include_tasks:
file: prerequisite.yml
Same for main logic, you can separate it into separate taks file
|
@kksat Done consolidating and combining some repeated tasks. |
|
looks like we have some issues with git hub at the moment: saving the last successful test run: https://ara.saponrhel.org/playbooks/1538.html |
No description provided.