Initial commit
[ta/infra-ansible.git] / conflicts-with-openstack-ansible / os-ironic-install.yml
1 #cmframework.requires: haproxy-install.yml, rabbitmq-install.yml, os-keystone-install.yml
2 ---
3 # Copyright 2016, Rackspace, Inc.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # cmframework.requires: memcached-install.yml,galera-install.yml,rabbitmq-install.yml,rsyslog-install.yml,os-keystone-install.yml,os-glance-install.yml,os-nova-install.yml,os-neutron-install.yml,os-swift-install.yml
17
18 - name: Installation and setup of Ironic
19   hosts: baremetal_management_nodes
20   gather_facts: "{{ osa_gather_facts | default(True) }}"
21   pre_tasks:
22     - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
23     - include: common-tasks/rabbitmq-vhost-user.yml
24       static: no
25       vars:
26         user: "{{ ironic_rabbitmq_userid }}"
27         password: "{{ ironic_rabbitmq_password }}"
28         vhost: "{{ ironic_rabbitmq_vhost }}"
29         _rabbitmq_host_group: "{{ ironic_rabbitmq_host_group }}"
30       when:
31         - inventory_hostname == groups['ironic_all'][0]
32         - groups[ironic_rabbitmq_host_group] | length > 0
33     - include: common-tasks/mysql-db-user.yml
34       static: no
35       vars:
36         user_name: "{{ ironic_galera_user }}"
37         password: "{{ ironic_container_mysql_password }}"
38         login_host: "{{ ironic_galera_address }}"
39         db_name: "{{ ironic_galera_database }}"
40       when: inventory_hostname == groups['ironic_all'][0]
41     - include: common-tasks/unbound-clients.yml
42       static: no
43       when:
44         - hostvars['localhost']['resolvconf_enabled'] | bool
45   roles:
46     - role: "os_ironic"
47     - role: "openstack_openrc"
48       tags:
49         - openrc
50     - role: "rsyslog_client"
51       rsyslog_client_log_rotate_file: ironic_log_rotate
52       rsyslog_client_log_dir: "/var/log/ironic"
53       rsyslog_client_config_name: "99-ironic-rsyslog-client.conf"
54       tags:
55         - rsyslog
56     - role: "system_crontab_coordination"
57       tags:
58         - crontab
59   vars:
60     ironic_galera_user: ironic
61     ironic_galera_database: ironic
62     ironic_galera_address: "{{ galera_address }}"
63   environment: "{{ deployment_environment_variables | default({}) }}"
64   tags:
65     - ironic