Allow enroll-dynamic on remote host

This change allows enroll nodes on remote server with installed Ironic.

Change-Id: Ic1211a4baebc1f807779261f4ed050ba6cdc177a
This commit is contained in:
Andrey Shestakov 2016-12-15 14:56:40 +02:00
parent 299a7259aa
commit 15fc6973e7
4 changed files with 12 additions and 10 deletions

View File

@ -1,13 +1,11 @@
---
- hosts: localhost
connection: local
name: "Collect facts"
become: no
gather_facts: yes
- hosts: baremetal
connection: local
name: "Enroll hardware from inventory into Ironic"
become: no
gather_facts: no
roles:
- role: ironic-enroll-dynamic
- { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool == true }
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"
- role: ironic-inspect-node
when: inspect_nodes | default('false') | bool == true
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"

View File

@ -1,2 +1,2 @@
[localhost]
localhost
127.0.0.1 ansible_connection=local

View File

@ -12,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: "Collect facts"
setup:
- name: "If in noauth mode, unset authentication parameters."
set_fact:
auth_type: None
@ -49,4 +52,3 @@
deploy:
deploy_kernel: "{{ ipa_kernel_url }}"
deploy_ramdisk: "{{ ipa_ramdisk_url }}"
delegate_to: localhost

View File

@ -12,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: "Collect facts"
setup:
- name: "If in noauth mode, unset authentication parameters."
set_fact:
auth_type: None
@ -66,4 +69,3 @@
uuid: "{{ uuid | default('') }}"
name: "{{ name | default('') }}"
timeout: "{{ inspection_wait_timeout }}"
delegate_to: localhost