From 03959b78b7c143ea42e51417ed12a53be070e032 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Fri, 22 Jan 2016 09:40:00 +0000 Subject: [PATCH] Create regcfp instance Signed-off-by: Patrick Uiterwijk --- .../host_vars/regcfp.fedorainfracloud.org | 18 +++++++++ inventory/inventory | 2 + .../hosts/regcfp.fedorainfracloud.org.yml | 40 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 inventory/host_vars/regcfp.fedorainfracloud.org create mode 100644 playbooks/hosts/regcfp.fedorainfracloud.org.yml diff --git a/inventory/host_vars/regcfp.fedorainfracloud.org b/inventory/host_vars/regcfp.fedorainfracloud.org new file mode 100644 index 0000000000..6f8b54f45f --- /dev/null +++ b/inventory/host_vars/regcfp.fedorainfracloud.org @@ -0,0 +1,18 @@ +--- +image: rhel7-20141015 +instance_type: m1.medium +keypair: fedora-admin-20130801 +security_group: ssh-anywhere-persistent,web-80-anywhere-persistent,web-443-anywhere-persistent,default +zone: nova +tcp_ports: [22, 80, 443] + +inventory_tenant: persistent +inventory_instance_name: regcfp +hostbase: regcfp +public_ip: 209.132.184.127 +root_auth_users: puiterwijk stickster +description: Flock registration software + +cloud_networks: + # persistent-net + - net-id: "67b77354-39a4-43de-b007-bb813ac5c35f" diff --git a/inventory/inventory b/inventory/inventory index 6cd002b36f..f185979784 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -963,6 +963,8 @@ faitout.fedorainfracloud.org communityblog.fedorainfracloud.org # Fedora Magazine magazine.fedorainfracloud.org +# Flock RegCfp instance +regcfp.fedorainfracloud.org # Fedora Bootstrap VM fedora-bootstrap.fedorainfracloud.org # darkserver development instance diff --git a/playbooks/hosts/regcfp.fedorainfracloud.org.yml b/playbooks/hosts/regcfp.fedorainfracloud.org.yml new file mode 100644 index 0000000000..29dc04350d --- /dev/null +++ b/playbooks/hosts/regcfp.fedorainfracloud.org.yml @@ -0,0 +1,40 @@ +- name: check/create instance + hosts: regcfp.fedorainfracloud.org + 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.yml" + +- name: setup all the things + hosts: regcfp.fedorainfracloud.org + 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: add packages + yum: state=present name={{ item }} + with_items: + - httpd + - postgresql + - postgresql-server + - mod_ssl + - wget + - unzip + + - name: enable httpd service + service: name=httpd enabled=yes state=started