diff --git a/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org b/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org new file mode 100644 index 0000000000..5f5eccd338 --- /dev/null +++ b/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org @@ -0,0 +1,11 @@ +--- +instance_type: m1.medium +image: ${el6_qcow_id} +keypair: fedora-admin +security_group: webserver +zone: nova +hostbase: copr-fe-dev +public_ip: 209.132.184.183 +root_auth_users: skvidal bkabrda ryanlerch pingou msuchy tradej +description: copr frontend server - dev instance +tcp_ports: ['22', '80', '443'] \ No newline at end of file diff --git a/playbooks/hosts/copr-fe-dev.cloud.fedoraproject.org.yml b/playbooks/hosts/copr-fe-dev.cloud.fedoraproject.org.yml new file mode 100644 index 0000000000..e1e457683b --- /dev/null +++ b/playbooks/hosts/copr-fe-dev.cloud.fedoraproject.org.yml @@ -0,0 +1,57 @@ +- name: check/create instance + hosts: copr-fe-dev.cloud.fedoraproject.org + user: root + gather_facts: False + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - ${private}/vars.yml + + tasks: + - include: $tasks/persistent_cloud.yml + - include: $tasks/growroot_cloud.yml + +- name: provision instance + hosts: copr-fe-dev.cloud.fedoraproject.org + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - ${private}/vars.yml + - ${vars}/${ansible_distribution}.yml + + tasks: + - include: $tasks/cloud_setup_basic.yml + - include: $tasks/iptables.yml + + - name: /srv/copr-fe dir + action: file state=directory path=/srv/copr-fe + + - name: install copr-fe pkgs + action: yum state=installed name=$item + with_items: + - httpd + - mod_wsgi + - postgresql + - bash-completion + - postgresql-server + - git + + - name: copy apache files to conf.d + action: copy src=$files/copr/fe/httpd/$item dest=/etc/httpd/conf.d/$item + with_items: + - coprs.conf + - welcome.conf + + + - name: start services + action: service state=running enabled=yes name=$item + with_items: + - httpd + - postgresql + + + + handlers: + - include: $handlers/restart_services.yml