Add new artboard instance in new cloud.
This commit is contained in:
parent
40ae74811a
commit
55f5882f73
3 changed files with 101 additions and 0 deletions
22
inventory/host_vars/artboard.fedorainfracloud.org
Normal file
22
inventory/host_vars/artboard.fedorainfracloud.org
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
image: "{{ rhel7-20141015 }}"
|
||||
instance_type: m1.small
|
||||
keypair: fedora-admin-20130801
|
||||
security_group: ssh-anywhere-persistent,web-80-anywhere-persistent,default,web-443-anywhere-persistent
|
||||
zone: nova
|
||||
tcp_ports: [22, 80, 443]
|
||||
|
||||
inventory_tenant: persistent
|
||||
inventory_instance_name: artboard
|
||||
hostbase: artboard
|
||||
public_ip: 209.132.184.61
|
||||
root_auth_users: duffy
|
||||
description: artboard server
|
||||
|
||||
volumes:
|
||||
- volume_id: 44956766-0ecb-496d-8d3c-f43e89b7f268
|
||||
device: /dev/vdc
|
||||
|
||||
cloud_networks:
|
||||
# persistent-net
|
||||
- net-id: "67b77354-39a4-43de-b007-bb813ac5c35f"
|
|
@ -819,6 +819,8 @@ darkserver-dev.cloud.fedoraproject.org
|
|||
#
|
||||
# Instances below are all moved to the new cloud
|
||||
#
|
||||
# artboard instance
|
||||
artboard.fedorainfracloud.org
|
||||
# copr production instances
|
||||
copr-be.cloud.fedoraproject.org
|
||||
copr-fe.cloud.fedoraproject.org
|
||||
|
|
77
playbooks/hosts/artboard.fedorainfracloud.org.yml
Normal file
77
playbooks/hosts/artboard.fedorainfracloud.org.yml
Normal file
|
@ -0,0 +1,77 @@
|
|||
- name: check/create instance
|
||||
hosts: artboard.fedorainfracloud.org
|
||||
user: fedora
|
||||
sudo: True
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- /srv/private/ansible/vars.yml
|
||||
- /srv/web/infra/ansible/vars/fedora-cloud.yml
|
||||
- /srv/private/ansible/files/openstack/passwords.yml
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/persistent_cloud_new.yml"
|
||||
- include: "{{ tasks }}/growroot_cloud.yml"
|
||||
|
||||
- name: setup all the things
|
||||
hosts: artboard.fedorainfracloud.org
|
||||
user: fedora
|
||||
sudo: True
|
||||
gather_facts: True
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- /srv/private/ansible/vars.yml
|
||||
- /srv/private/ansible/files/openstack/passwords.yml
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
pre_tasks:
|
||||
- include: "{{ tasks }}/cloud_setup_basic.yml"
|
||||
- name: set hostname (required by some services, at least postfix need it)
|
||||
shell: "hostname {{inventory_hostname}}"
|
||||
|
||||
tasks:
|
||||
|
||||
- name: mount up disk of persistent storage
|
||||
mount: name=/srv/persist src='LABEL=artboard' fstype=ext4 state=mounted
|
||||
|
||||
# packages needed
|
||||
- name: add packages
|
||||
yum: state=present name={{ item }}
|
||||
with_items:
|
||||
- rsync
|
||||
- openssh-clients
|
||||
- httpd
|
||||
- httpd-tools
|
||||
- php
|
||||
- php-gd
|
||||
- php-mysql
|
||||
- cronie-noanacron
|
||||
|
||||
# packages needed to be gone
|
||||
- name: erase packages
|
||||
yum: state=absent name={{ item }}
|
||||
with_items:
|
||||
- cronie-anacron
|
||||
|
||||
- name: artboard backup thing
|
||||
copy: src="{{ files }}/artboard/artboard-backup" dest=/etc/cron.daily/artboard-backup mode=0755
|
||||
|
||||
- name: make artboard subdir
|
||||
file: path=/srv/persist/artboard mode=0755 state=directory
|
||||
|
||||
- name: link artboard into /var/www/html
|
||||
file: state=link src=/srv/persist/artboard path=/var/www/html/artboard
|
||||
|
||||
- name: add apache confs
|
||||
copy: src="{{ files }}/artboard/{{ item }}" dest="/etc/httpd/conf.d/{{ item }}" backup=true
|
||||
with_items:
|
||||
- artboard.conf
|
||||
- redirect.conf
|
||||
notify: restart httpd
|
||||
|
||||
- name: startup apache
|
||||
service: name=httpd state=started
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
Loading…
Add table
Add a link
Reference in a new issue