diff --git a/inventory/host_vars/209.132.184.49 b/inventory/host_vars/209.132.184.49 index 4af88173d3..7ee4cd37fd 100644 --- a/inventory/host_vars/209.132.184.49 +++ b/inventory/host_vars/209.132.184.49 @@ -1,4 +1,5 @@ --- +# TODO: remove me! instance_type: m1.xlarge flavor_id: 2 # image: "{{ f20_qcow_id }}" diff --git a/playbooks/groups/copr-backend-newcloud.yml b/playbooks/groups/copr-backend-newcloud.yml new file mode 100644 index 0000000000..d2c99ae2e9 --- /dev/null +++ b/playbooks/groups/copr-backend-newcloud.yml @@ -0,0 +1,78 @@ +- name: check/create instance + hosts: copr-be-dev.cloud.fedoraproject.org + #hosts: copr-be-dev2.cloud.fedoraproject.org + #hosts: copr-back:copr-back-stg + #hosts: copr-back-stg + user: fedora + sudo: True + #user: root + gather_facts: False + # 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 + vars: + OS_AUTH_URL: "https://fed-cloud09.cloud.fedoraproject.org:5000/v2.0" + + # DEBUG OTHER + #vars_prompt: + # - name: "OS_USERNAME" + # prompt: "Enter user name for perform actions with OS" + # private: no + + # - name: "OS_PASSWORD" + # prompt: "Enter OS password" + # private: yes + + + tasks: + # - include: "{{ tasks }}/persistent_cloud.yml" + + # DEBUG OTHER + - include: "{{ tasks }}/persistent_cloud_new.yml" + - include: "{{ tasks }}/growroot_cloud.yml" + - debug: msg="root auth users {{root_auth_users}}" + +- name: cloud basic setup + hosts: 209.132.184.53 + #hosts: copr-be-dev2.cloud.fedoraproject.org + #hosts: copr-back:copr-back-stg + #hosts: copr-back-stg + user: fedora + sudo: True + gather_facts: True + # gather_facts: False + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + + tasks: + - include: "{{ tasks }}/cloud_setup_basic.yml" + + - name: set hostname (required by some services, at least postfix need it) + shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" + +- name: provision instance + hosts: 209.132.184.53 + #hosts: copr-be-dev2.cloud.fedoraproject.org + #hosts: copr-back:copr-back-stg + #hosts: copr-back-stg + #user: root + gather_facts: True + #gather_facts: False + user: fedora + sudo: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + # Roles are run first, before tasks, regardless of where you place them here. + roles: + - base + - copr/backend + - fedmsg/base diff --git a/playbooks/groups/copr-backend.yml b/playbooks/groups/copr-backend.yml index d2c99ae2e9..c317408f35 100644 --- a/playbooks/groups/copr-backend.yml +++ b/playbooks/groups/copr-backend.yml @@ -1,50 +1,20 @@ - name: check/create instance - hosts: copr-be-dev.cloud.fedoraproject.org - #hosts: copr-be-dev2.cloud.fedoraproject.org - #hosts: copr-back:copr-back-stg + hosts: copr-back:copr-back-stg #hosts: copr-back-stg - user: fedora - sudo: True - #user: root + user: root gather_facts: False - # 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 - vars: - OS_AUTH_URL: "https://fed-cloud09.cloud.fedoraproject.org:5000/v2.0" - - # DEBUG OTHER - #vars_prompt: - # - name: "OS_USERNAME" - # prompt: "Enter user name for perform actions with OS" - # private: no - - # - name: "OS_PASSWORD" - # prompt: "Enter OS password" - # private: yes - tasks: - # - include: "{{ tasks }}/persistent_cloud.yml" - - # DEBUG OTHER - - include: "{{ tasks }}/persistent_cloud_new.yml" + - include: "{{ tasks }}/persistent_cloud.yml" - include: "{{ tasks }}/growroot_cloud.yml" - - debug: msg="root auth users {{root_auth_users}}" - name: cloud basic setup - hosts: 209.132.184.53 - #hosts: copr-be-dev2.cloud.fedoraproject.org - #hosts: copr-back:copr-back-stg + hosts: copr-back:copr-back-stg #hosts: copr-back-stg - user: fedora - sudo: True - gather_facts: True - # gather_facts: False vars_files: - /srv/web/infra/ansible/vars/global.yml - "/srv/private/ansible/vars.yml" @@ -52,19 +22,11 @@ tasks: - include: "{{ tasks }}/cloud_setup_basic.yml" - - name: set hostname (required by some services, at least postfix need it) - shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - - name: provision instance - hosts: 209.132.184.53 - #hosts: copr-be-dev2.cloud.fedoraproject.org - #hosts: copr-back:copr-back-stg + hosts: copr-back:copr-back-stg #hosts: copr-back-stg - #user: root - gather_facts: True - #gather_facts: False - user: fedora - sudo: True + user: root + gather_facts: False vars_files: - /srv/web/infra/ansible/vars/global.yml diff --git a/playbooks/groups/copr-frontend-newcloud.yml b/playbooks/groups/copr-frontend-newcloud.yml new file mode 100644 index 0000000000..89eaacf13b --- /dev/null +++ b/playbooks/groups/copr-frontend-newcloud.yml @@ -0,0 +1,41 @@ +- name: check/create instance + hosts: copr-front-stg:copr-front + #hosts: copr-front + user: root + gather_facts: False + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + + tasks: + - include: "{{ tasks }}/persistent_cloud.yml" + - include: "{{ tasks }}/growroot_cloud.yml" + + +- name: cloud basic setup + hosts: copr-front-stg:copr-front + #hosts: copr-front + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + + tasks: + - include: "{{ tasks }}/cloud_setup_basic.yml" + - name: set hostname (required by some services, at least postfix need it) + shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" + +- name: provision instance + hosts: copr-front:copr-front-stg + #hosts: copr-front + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - base + - copr/frontend diff --git a/roles/copr/backend/templates/provision/builderpb-fedora.yml b/roles/copr/backend/templates/provision/builderpb-fedora.yml index 6f50c3de1d..ac866b5fa1 100644 --- a/roles/copr/backend/templates/provision/builderpb-fedora.yml +++ b/roles/copr/backend/templates/provision/builderpb-fedora.yml @@ -55,16 +55,6 @@ - openssh-clients - libselinux-python - libsemanage-python - -# - name: add repos -# action: copy src={{ files }}/{{ item }} dest=/etc/yum.repos.d/{{ item }} -# with_items: -# - builder.repo -# - epel6.repo - - - name: install additional pkgs - action: yum state=present pkg={{ item }} - with_items: - mock - createrepo - yum-utils @@ -77,8 +67,6 @@ - glib2 - ca-certificates -# - yum: name=mock enablerepo=epel-testing state=latest - - name: mockbuilder user action: user name=mockbuilder groups=mock