dell / redfish-ansible-module

Ansible modules for Out-Of-Band Controllers using Redfish APIs
GNU General Public License v3.0
197 stars 80 forks source link

Skip execution if the same configuration is already set #79

Open rht-jbittner opened 6 years ago

rht-jbittner commented 6 years ago

Hi, I would like to ask you to implement option check before executing change command. For example: 1) run playbook with some bios config sets 2) wait until reboot is done 3) run same playbook from 1) with same settings

Server gets rebooted again. It would be great to check system settings value before forcefully apply same setting and again reboot server.

I am using this to have requested functionality, but I think it should be build-in in redfish_config module.

- name: Set Secure boot state
  redfish_config:
    category: Systems
    command: SetBiosAttributes
    bios_attr_name: SecureBoot
    bios_attr_value: "{{ idrac_secure_boot_state }}"
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"
  when: ansible_facts.redfish_facts.bios_attribute.entries.SecureBoot != idrac_secure_boot_state
  notify:
    - Add to BIOS queue
jose-delarosa commented 6 years ago

This is already done, please use modules in http://github.com/ansible/ansible. Please note that modules in this git repo are no longer being updated. Please refer to https://github.com/ansible/ansible/pull/47462.