Skip to content
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

Skip execution if the same configuration is already set #79

Open
rht-jbittner opened this issue Nov 16, 2018 · 1 comment
Open

Skip execution if the same configuration is already set #79

rht-jbittner opened this issue Nov 16, 2018 · 1 comment

Comments

@rht-jbittner
Copy link

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
@rht-jbittner rht-jbittner changed the title Skip execution if if same configuration is already set Skip execution if the same configuration is already set Nov 16, 2018
@jose-delarosa
Copy link
Contributor

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 ansible/ansible#47462.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants