[copr][dist-git] adding to ansible dist-git instance for copr service
This commit is contained in:
parent
09cd29c1a4
commit
4e0cf80a0a
5 changed files with 66 additions and 0 deletions
5
inventory/group_vars/copr-dist-git
Normal file
5
inventory/group_vars/copr-dist-git
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
tcp_ports: [22, 80]
|
||||
datacenter: cloud
|
||||
freezes: false
|
||||
# volumes: []
|
4
inventory/group_vars/copr-dist-git-stg
Normal file
4
inventory/group_vars/copr-dist-git-stg
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
tcp_ports: [22, 80]
|
||||
datacenter: cloud
|
||||
freezes: false
|
3
inventory/host_vars/209.132.184.162
Normal file
3
inventory/host_vars/209.132.184.162
Normal file
|
@ -0,0 +1,3 @@
|
|||
# TODO: remove this config after copr-dist-git is moved to persistent tenant
|
||||
name: copr-dist-git-dev
|
||||
volumes: [ {volume_id: '21988d9d-f41e-46c4-b063-1c95df2f9205', device: '/dev/vdc'} ]
|
|
@ -929,6 +929,9 @@ copr-fe.cloud.fedoraproject.org
|
|||
[copr-back]
|
||||
copr-be.cloud.fedoraproject.org
|
||||
|
||||
[copr-dist-git-stg]
|
||||
209.132.184.162
|
||||
|
||||
[copr:children]
|
||||
copr-front
|
||||
copr-back
|
||||
|
|
51
playbooks/groups/copr-dist-git.yml
Normal file
51
playbooks/groups/copr-dist-git.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
- name: check/create instance
|
||||
hosts: copr-dist-git-stg:copr-dist-git
|
||||
|
||||
user: centos
|
||||
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 }}/persistend_cloud_new.yml"
|
||||
- include: "{{ tasks }}/growroot_cloud.yml"
|
||||
# TODO: remove when copr-dist-git will be deployed to the persistent tenant
|
||||
- local_action: shell nova --os-auth-url="{{os_auth_url}}" --os-username="admin" --os-password="{{ADMIN_PASS}}" --os-tenant-name={{inventory_tenant}} volume-list | grep ' {{item.volume_id}} ' | grep 'available' && nova --os-auth-url="{{os_auth_url}}" --os-username="admin" --os-password="{{ADMIN_PASS}}" --os-tenant-name={{inventory_tenant}} volume-attach "{{inventory_instance_name}}" "{{item.volume_id}}" "{{item.device}}"
|
||||
with_items: volumes
|
||||
ignore_errors: yes
|
||||
when: volumes is defined
|
||||
|
||||
- name: cloud basic setup
|
||||
hosts: copr-dist-git-stg:copr-dist-git
|
||||
# hosts: copr-keygen
|
||||
user: centos
|
||||
sudo: True
|
||||
gather_facts: True
|
||||
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-dist-git-stg:copr-dist-git
|
||||
user: centos
|
||||
sudo: True
|
||||
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/dist-git
|
Loading…
Add table
Add a link
Reference in a new issue