53 lines
2 KiB
YAML
53 lines
2 KiB
YAML
---
|
|
|
|
- name: deploy Open Stack compute node
|
|
hosts: fed-cloud10.cloud.fedoraproject.org
|
|
user: root
|
|
sudo: yes
|
|
gather_facts: True
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "{{ private }}/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
- "{{ private }}/files/openstack/passwords.yml"
|
|
|
|
roles:
|
|
- base
|
|
- rkhunter
|
|
- nagios_client
|
|
- hosts
|
|
- fas_client
|
|
- collectd/base
|
|
- sudo
|
|
|
|
tasks:
|
|
- include: "{{ tasks }}/yumrepos.yml"
|
|
- include: "{{ tasks }}/2fa_client.yml"
|
|
- include: "{{ tasks }}/motd.yml"
|
|
|
|
- authorized_key: user=root key="{{ lookup('file', files + '/fedora-cloud/fed09-ssh-key.pub') }}"
|
|
|
|
# http://docs.openstack.org/icehouse/install-guide/install/yum/content/nova-controller.html
|
|
- name: install the Compute packages necessary for the controller node.
|
|
action: yum state=present pkg={{ item }}
|
|
with_items:
|
|
- openstack-nova-api
|
|
- openstack-nova-cert
|
|
- openstack-nova-conductor
|
|
- openstack-nova-console
|
|
- openstack-nova-novncproxy
|
|
- openstack-nova-scheduler
|
|
- python-novaclient
|
|
- name: Set up db connection to controller
|
|
action: command openstack-config --set /etc/nova/nova.conf database connection mysql://nova:{{NOVA_DBPASS}}@{{controller_private_ip}}/nova
|
|
- name: Set these configuration keys to configure Compute to use the Qpid message broker
|
|
action: command openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend qpid
|
|
- command: openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname {{controller_private_ip}}
|
|
- command: openstack-config --set /etc/nova/nova.conf DEFAULT my_ip {{controller_private_ip}}
|
|
- command: openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen {{controller_private_ip}}
|
|
- command: openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address {{controller_private_ip}}
|
|
|
|
handlers:
|
|
- include: "{{ handlers }}/restart_services.yml"
|
|
- include: "{{ handlers }}/semanage.yml"
|