-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(ansible): Adding bios config job and reboot tasks in bios.yml #40
Conversation
Signed-off-by: Rahul <[email protected]>
Signed-off-by: Rahul <[email protected]>
Signed-off-by: Rahul <[email protected]>
ansible/bios.yml
Outdated
# TODO: configre BIOS to be always on ( see lab/hardware/dh123) and any virtualization or hyper threading settings we might need | ||
|
||
- name: Debug print bios serial number | ||
when: inventory_hostname == 'dh1bmc' |
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.
remove when
here and rename the task from serial
ansible/bios.yml
Outdated
# password: "{{ ansible_password }}" | ||
# when: bios_attribute.changed | ||
- name: Create BIOS configuration job (schedule BIOS setting update) | ||
when: inventory_hostname == 'dh1bmc' |
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 we should use another condition here
In previous task or from gather_facts we can already know if we talking to iDRAC or not
let's use that as a condition
ansible/bios.yml
Outdated
# password: "{{ ansible_password }}" | ||
# when: bios_attribute.changed | ||
- name: Reboot system to apply new BIOS settings | ||
when: inventory_hostname == 'dh1bmc' |
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.
two when
statements ? one here and another one below bios_config_job.changed
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.
2 when statements
ansible/bios.yml
Outdated
# TODO: configre BIOS to be always on ( see lab/hardware/dh123) and any virtualization or hyper threading settings we might need | ||
#- name: Debug print bios attributes | ||
#ansible.builtin.debug: msg={{ result }} | ||
#ansible.builtin.debug: msg={{ result.redfish_facts.bios_attribute.entries[0][1].SystemManufacturer }} |
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.
this is a good debug line to keep uncommented
all the rest comments should be removed
ansible/bios.yml
Outdated
@@ -43,25 +49,30 @@ | |||
username: "{{ ansible_user }}" | |||
password: "{{ ansible_password }}" | |||
register: bios_attribute | |||
tags: ["TEST"] | |||
# tags: ["TEST"] |
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.
remove this line
ansible/bios.yml
Outdated
# password: "{{ ansible_password }}" | ||
# when: bios_attribute.changed | ||
- name: Create BIOS configuration job (schedule BIOS setting update) | ||
when: result.redfish_facts.bios_attribute.entries[0][1].SystemManufacturer is defined and result.redfish_facts.bios_attribute.entries[0][1].SystemManufacturer == "Dell Inc." and bios_attribute.changed |
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 split into lines like
Lines 72 to 76 in dabdb55
- name: Run telegraf container on others | |
when: | |
- inventory_hostname != 'mev' | |
- inventory_hostname != 'bf2' | |
community.docker.docker_container: |
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.
Much better!!!
few small suggestions inside
and please squash all the commits to a single one
Signed-off-by: Rahul <[email protected]>
Will work on Boris's suggestions and submit a new PR |
No description provided.