Setup basic postgresql server and add a db-aarch64 to test with.
This commit is contained in:
parent
93e53a78be
commit
f00b97e48e
5 changed files with 94 additions and 0 deletions
10
inventory/group_vars/postgresql-server
Normal file
10
inventory/group_vars/postgresql-server
Normal 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
|
10
inventory/host_vars/db-aarch64.qa.fedoraproject.org
Normal file
10
inventory/host_vars/db-aarch64.qa.fedoraproject.org
Normal 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
|
|
@ -151,6 +151,9 @@ db-fas01.phx2.fedoraproject.org
|
||||||
db-fas01.stg.phx2.fedoraproject.org
|
db-fas01.stg.phx2.fedoraproject.org
|
||||||
db02.stg.phx2.fedoraproject.org
|
db02.stg.phx2.fedoraproject.org
|
||||||
|
|
||||||
|
[dbserver-secondary]
|
||||||
|
db-aarch64.qa.fedoraproject.org
|
||||||
|
|
||||||
[dev]
|
[dev]
|
||||||
fas01.dev.fedoraproject.org
|
fas01.dev.fedoraproject.org
|
||||||
survey01.dev.fedoraproject.org
|
survey01.dev.fedoraproject.org
|
||||||
|
|
51
playbooks/groups/postgresl-server.yml
Normal file
51
playbooks/groups/postgresl-server.yml
Normal 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
|
20
tasks/postgresql_server.yml
Normal file
20
tasks/postgresql_server.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue