Skip to content

Saving and restoring BMC settings bundle via Redfish using Ansible

License

Notifications You must be signed in to change notification settings

paulfertser/ansible_redfish_settings

Repository files navigation

Description

This project aims at providing an easy to use mechanism for creating a human-readable and editable BMC settings configuration bundle and for reliable idempotent application of them to an arbitrary number of machines. It should be possible to use it directly or to seamlessly integrate into larger Ansible playbooks as desired. The tasks files are provided under MIT licence terms.

Added as a submodule is a fork of community.general Ansible collection. The changes are minimal: extending backwards compatibility and renaming to not clash with system-wide installation. The idea is to provide fast, easy and straightforward mechanism to prepare and test patches for submitting Github pull requests to upstream repository: https://github.com/ansible-collections/community.general . After the PRs are merged it's trivial to rebase to get the latest-and-greatest code. Please note this collection is published under GPL-3.0.

The testing was performed against OpenBMC hosts but it should be working reasonably with any other Redfish compliant server.

System requirements

Ansible version 2.10.0 (released in 2020) or later.

Installation instructions

# apt install ansible
$ git clone --recursive https://github.com/paulfertser/ansible_redfish_settings

If you really need a fully "standalone" solution, consider packaging with Nuitka as described here: https://github.com/HexmosTech/Ansika .

Usage examples

Example command to retrieve all the settings from a single host:

$ ansible-playbook get_settings.yaml --extra-vars "baseuri=172.41.1.38 username=root password=0penBmc"

The data will be saved to settings_172.41.1.38.yaml file.

Example command to set settings for a single host:

$ ansible-playbook set_settings.yaml --extra-vars "baseuri=172.41.1.38 username=root password=0penBmc"  --extra-vars @settings_172.41.1.38.yaml

The repository includes sample inventory.ini which allows to retrieve and set settings en masse:

$ ansible-playbook get_settings.yaml -i inventory.ini

About

Saving and restoring BMC settings bundle via Redfish using Ansible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published