-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathseqware-admin-webservice-install.yml
More file actions
29 lines (26 loc) · 1.13 KB
/
seqware-admin-webservice-install.yml
File metadata and controls
29 lines (26 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
# file: seqware-admin-webservice-install.yml
# This file is used for installing two hosts, a database server and a webapp server with the admin web service
# Not sure why, but I needed this to create a /etc/hosts that actually works with the Ubuntu image here on openstack
- hosts: all
sudo: True
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
tasks:
- name: Build hosts file for all hosts
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
# The grid master depends on the hosts file, as we need to know at least who we
# are by this stage.
- hosts: dbserver
sudo: True
roles:
- { role: java, java_provider: Oracle8 }
- { role: postgres }
- hosts: webserver
sudo: True
roles:
- { role: java, java_provider: Oracle8 }
- { role: glassfish }