54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
- name: check/create instance
|
|
hosts: copr-front-stg:copr-front
|
|
# hosts: copr-front
|
|
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"
|
|
- name: clean out old known_hosts for copr-fe-dev
|
|
local_action: known_hosts path={{item}} host=copr-fe-dev.cloud.fedoraproject.org state=absent
|
|
ignore_errors: True
|
|
with_items:
|
|
- /root/.ssh/known_hosts
|
|
- /etc/ssh/ssh_known_hosts
|
|
- include: "{{ tasks }}/growroot_cloud.yml"
|
|
|
|
|
|
- name: cloud basic setup
|
|
hosts: copr-front-stg:copr-front
|
|
# hosts: copr-front
|
|
user: fedora
|
|
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-front:copr-front-stg
|
|
# hosts: copr-front
|
|
user: fedora
|
|
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/frontend
|