Merge "Additional inspection role and adding role to NV job script"
This commit is contained in:
commit
1dc2451ede
@ -10,3 +10,4 @@
|
||||
become: no
|
||||
roles:
|
||||
- role: ironic-enroll-dynamic
|
||||
- { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool }
|
||||
|
57
playbooks/roles/ironic-inspect-node/README.md
Normal file
57
playbooks/roles/ironic-inspect-node/README.md
Normal file
@ -0,0 +1,57 @@
|
||||
ironic-inspect-node
|
||||
===================
|
||||
|
||||
Invokes ironic node introspection logic using the os_ironic_inspect module.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
None at this time. See Dependencies.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
uuid: The UUID of the node to invoke ironic node introspection upon.
|
||||
This variable is not required if the node name is supplied as
|
||||
ironic requires unique names.
|
||||
|
||||
name: A node name to invoke inspection upon. This variable is not
|
||||
required if the node uuid value is supplied.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
This role is dependent upon the os_ironic_inspect module being
|
||||
available for use.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
hosts: testvm
|
||||
name: "Introspect node"
|
||||
sudo: no
|
||||
gather_facts: no
|
||||
roles:
|
||||
- role: ironic-inspect-node
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
Ironic Developers
|
2
playbooks/roles/ironic-inspect-node/defaults/main.yml
Normal file
2
playbooks/roles/ironic-inspect-node/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for ironic-inspect-node
|
2
playbooks/roles/ironic-inspect-node/handlers/main.yml
Normal file
2
playbooks/roles/ironic-inspect-node/handlers/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for ironic-inspect-node
|
24
playbooks/roles/ironic-inspect-node/meta/main.yml
Normal file
24
playbooks/roles/ironic-inspect-node/meta/main.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: Ironic Developers
|
||||
description: Invoke ironic node hardware introspection.
|
||||
company: OpenStack
|
||||
license: Apache
|
||||
min_ansible_version: 1.9
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
- name: Fedora
|
||||
versions:
|
||||
- 20
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- trusty
|
||||
- name: Debian
|
||||
versions:
|
||||
- wheezy
|
||||
categories:
|
||||
- cloud
|
||||
- cloud:openstack
|
||||
dependencies: []
|
21
playbooks/roles/ironic-inspect-node/tasks/main.yml
Normal file
21
playbooks/roles/ironic-inspect-node/tasks/main.yml
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
---
|
||||
- name: "Execute node introspection"
|
||||
os_ironic_inspect:
|
||||
auth_type: None
|
||||
auth: None
|
||||
ironic_url: "{{ ironic_url }}"
|
||||
uuid: "{{ uuid }}"
|
||||
delegate_to: localhost
|
2
playbooks/roles/ironic-inspect-node/vars/main.yml
Normal file
2
playbooks/roles/ironic-inspect-node/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for ironic-inspect-node
|
@ -68,6 +68,7 @@
|
||||
connection: local
|
||||
roles:
|
||||
- role: ironic-enroll-dynamic
|
||||
- { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool }
|
||||
- hosts: baremetal
|
||||
name: "Creat configuration drive files and deploy machines."
|
||||
become: no
|
||||
|
@ -48,7 +48,9 @@ ansible-playbook -vvvv -i inventory/bifrost_inventory.py \
|
||||
test-bifrost-dynamic.yaml \
|
||||
-e testing_user=root \
|
||||
-e download_ipa=false \
|
||||
-e create_ipa_image=true
|
||||
-e create_ipa_image=true \
|
||||
-e inspect_nodes=true \
|
||||
-e enable_inspector=true
|
||||
EXITCODE=$?
|
||||
|
||||
if [ $EXITCODE != 0 ]; then
|
||||
@ -67,4 +69,6 @@ sudo cp /var/log/upstart/ironic-api.log .${LOG_LOCATION}/
|
||||
sudo chown $USER ${LOG_LOCATION}/ironic-api.log
|
||||
sudo cp /var/log/upstart/ironic-conductor.log ${LOG_LOCATION}/
|
||||
sudo chown $USER ${LOG_LOCATION}/ironic-conductor.log
|
||||
sudo cp /var/log/upstart/ironic-inspector.log ${LOG_LOCATION}/
|
||||
sudo chown $USER ${LOG_LOCATION}/ironic-inspector.log
|
||||
exit $EXITCODE
|
||||
|
Loading…
Reference in New Issue
Block a user