kayobe/ansible/roles/ironic-inspector-rules
Mark Goddard 935d3cef6a Update dependencies to Rocky
Use stable/rocky branch of:

* Kolla
* Kolla ansible
* Bifrost
* IPA
* OpenStack services
* Requirements

Also updates Kolla Ansible inventory template.

The seed deploy job has been made non-voting and non-gating, because we
are waiting for bifrost change https://review.openstack.org/#/c/618740
to merge, be released, and for the kolla bifrost image to use the new
package.

Change-Id: Id5e7fdbd196f96e1e75ffc68bc93aab18fa38aa7
Story: 2001864
Task: 27798
Depends-On: I58e4f951d4a3dd89e0784fd82d8a62dbba374f79
2018-11-19 14:37:33 +00:00
..
defaults Support Ironic inspector in Bifrost container 2017-03-03 14:19:53 +00:00
library Update dependencies to Rocky 2018-11-19 14:37:33 +00:00
meta Move shade, openstackclient and projects roles to Ansible Galaxy 2017-04-06 21:37:20 +01:00
tasks Use (de)activate-virtualenv role to activate virtualenvs 2017-12-19 16:32:48 +00:00
README.md Correct module name in ironic-inspector-rules role README 2017-03-28 17:56:57 +01:00

Ironic Inspector Rules

This role provides a module, os_ironic_inspector_rule, which may be used to configure an introspection rule in OpenStack ironic inspector. The role installs required python dependencies in a virtualenv, and uses the os_ironic_inspector_rule module to configure a set of rules.

Requirements

The OpenStack ironic inspector API should be accessible from the target host.

Role Variables

ironic_inspector_venv is a path to a directory in which to create a virtualenv.

ironic_inspector_auth_type is an authentication type compatible with the auth_type argument of os_* Ansible modules.

ironic_inspector_auth is a dict containing authentication information compatible with the auth argument of os_* Ansible modules.

ironic_inspector_url is the URL of Ironic Inspector API endpoint, required if no authentication is used.

ironic_inspector_rules is a list of introspection rules which should exist. See the Inspector rules API for details of parameters available for rules.

Dependencies

This role depends on the Kayobe shade role.

Example Playbook

The following playbook configures an introspection rule to set the IPMI username and password fields in a node's driver info if they are currently empty.

---
- name: Ensure ironic inspector introspection rules are configured
  hosts: ironic-inspector
  roles:
    - role: ironic-inspector-rules
      ironic_inspector_venv: "~/ironic-inspector-rules-venv"
      ironic_inspector_auth_type: "password"
      ironic_inspector_auth:
        project_name: <keystone project>
        username: <keystone user>
        password: <keystone password>
        auth_url: <keystone auth URL>
      ironic_inspector_rules:
        - description: "Set IPMI driver_info if no credentials"
          conditions:
            - field: "node://driver_info.ipmi_username"
              op: "is-empty"
            - field: "node://driver_info.ipmi_password"
              op: "is-empty"
          actions:
            - action: "set-attribute"
              path: "driver_info/ipmi_username"
              value: "<IPMI username>"
            - action: "set-attribute"
              path: "driver_info/ipmi_password"
              value: "<IPMI password>"

Author Information