Vasyl Saienko | 8403d17 | 2017-04-27 14:21:46 +0300 | [diff] [blame] | 1 | {%- from "ironic/map.jinja" import client with context %} |
| 2 | {%- if client.enabled %} |
| 3 | |
| 4 | ironic_client_pkg: |
| 5 | pkg.installed: |
| 6 | - names: {{ client.pkgs }} |
| 7 | - install_recommends: False |
| 8 | |
| 9 | {%- for identity_name, nodes in client.nodes.iteritems() %} |
| 10 | {%- for node in nodes %} |
| 11 | |
| 12 | node_{{ node.name }}_present: |
| 13 | ironicng.node_present: |
| 14 | - name: {{ node.name }} |
| 15 | - driver: {{ node.driver }} |
Vasyl Saienko | aad112d | 2017-06-19 16:45:37 +0300 | [diff] [blame^] | 16 | - properties: {{ node.properties|default({}) }} |
Vasyl Saienko | 8403d17 | 2017-04-27 14:21:46 +0300 | [diff] [blame] | 17 | - profile: {{ identity_name }} |
Vasyl Saienko | aad112d | 2017-06-19 16:45:37 +0300 | [diff] [blame^] | 18 | - driver_info: {{ node.driver_info|default({}) }} |
Vasyl Saienko | 8403d17 | 2017-04-27 14:21:46 +0300 | [diff] [blame] | 19 | |
Vasyl Saienko | aad112d | 2017-06-19 16:45:37 +0300 | [diff] [blame^] | 20 | {%- if node.ports is defined %} |
Vasyl Saienko | 8403d17 | 2017-04-27 14:21:46 +0300 | [diff] [blame] | 21 | {%- for port in node.ports %} |
| 22 | |
| 23 | {{ node.name }}_port{{ loop.index }}_present: |
| 24 | ironicng.port_present: |
| 25 | - address: {{ port.address }} |
| 26 | - node_name: {{ node.name }} |
| 27 | - profile: {{ identity_name }} |
| 28 | |
| 29 | {%- endfor %} # end for ports |
Vasyl Saienko | aad112d | 2017-06-19 16:45:37 +0300 | [diff] [blame^] | 30 | {%- endif %} # end if node.ports defined |
Vasyl Saienko | 8403d17 | 2017-04-27 14:21:46 +0300 | [diff] [blame] | 31 | |
| 32 | {%- endfor %} # end for nodes |
| 33 | {%- endfor %} # end client.nodes.iteritems |
| 34 | |
| 35 | {%- endif %} # end if client.enabled |