Setup basic postgresql server and add a db-aarch64 to test with.

This commit is contained in:
Kevin Fenzi 2013-06-24 21:27:04 +00:00
parent 93e53a78be
commit f00b97e48e
5 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,10 @@
---
# common items for the releng-* boxes
lvm_size: 50000
mem_size: 8192
num_cpus: 4
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
tcp_ports: [ 80 ]
fas_client_groups: sysadmin-noc

View file

@ -0,0 +1,10 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-6
ks_repo: http://10.5.126.23/repo/rhel/RHEL6-x86_64/
volgroup: /dev/VirtGuests
eth0_ip: 10.5.124.148
vmhost: virthost-comm02.qa.fedoraproject.org
datacenter: phx2

View file

@ -151,6 +151,9 @@ db-fas01.phx2.fedoraproject.org
db-fas01.stg.phx2.fedoraproject.org
db02.stg.phx2.fedoraproject.org
[dbserver-secondary]
db-aarch64.qa.fedoraproject.org
[dev]
fas01.dev.fedoraproject.org
survey01.dev.fedoraproject.org

View file

@ -0,0 +1,51 @@
# create a new database server system
# NOTE: should be used with --limit most of the time
# NOTE: most of these vars come from group_vars/backup_server or from hostvars
- name: make postgresql-server
hosts: dbserver-secondary
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- ${private}/vars.yml
- ${vars}/${ansible_distribution}.yml
tasks:
- include: $tasks/virt_instance_create.yml
handlers:
- include: $handlers/restart_services.yml
# Once the instance exists, configure it.
- name: make db server system
hosts: dbserver-secondary
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- ${private}/vars.yml
- ${vars}/${ansible_distribution}.yml
tasks:
tasks:
- include: $tasks/hosts.yml
- include: $tasks/yumrepos.yml
- include: $tasks/base.yml
- include: $tasks/fas_client.yml
- include: $tasks/2fa_client.yml
- include: $tasks/motd.yml
- include: $tasks/sudo.yml
- include: $tasks/rkhunter.yml
- include: $tasks/denyhosts.yml
- include: $tasks/nagios_client.yml
- include: $tasks/collectd/client.yml
- include: $tasks/postgresql_server.yml
# TODO: add iscsi task
handlers:
- include: $handlers/restart_services.yml

View file

@ -0,0 +1,20 @@
---
#
# Setup postgresql server.
#
- name: install postgresql server packages
yum: name=$item state=installed
with_items:
- postgresql-server
- postgresql-contrib
- postgresql-plpython
tags:
- packages
- name: Set postgresql-server to run on boot
service: name=postgresql enabled=yes
ignore_errors: true
notify:
- restart postgresql
tags:
- service