ansible/playbooks/groups/buildvm.yml

109 lines
4 KiB
YAML
Raw Normal View History

# create a new koji builder
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this builder on the buildvmhost
# NOTE: most of these vars_path come from group_vars/buildvm or from hostvars
2016-09-03 11:00:36 +00:00
- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=buildvm:buildvm-stg:buildvm-aarch64:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390"
- name: make koji builder(s)
hosts: buildvm:buildvm-stg:buildvm-aarch64:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
2014-01-06 18:22:18 +00:00
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
2015-11-07 20:11:23 +00:00
pre_tasks:
- include: "{{ tasks }}/yumrepos.yml"
2016-03-07 22:09:45 +00:00
- include: "{{ tasks }}/osbs_certs.yml"
- include: "{{ tasks }}/osbs_repos.yml"
2015-11-07 20:11:23 +00:00
2013-08-27 05:22:42 +00:00
roles:
- base
- hosts
- apache
- { role: nfs/client, mnt_dir: '/mnt/fedora_koji', nfs_src_dir: "{{ koji_hub_nfs }}" }
- { role: fas_client, when: not inventory_hostname.startswith('bkernel') }
- { role: sudo, when: not inventory_hostname.startswith('bkernel') }
- koji_builder
- role: keytab/service
kt_location: /etc/kojid/kojid.keytab
service: compile
when: env == "staging" or krb_builder
- {
role: osbs-client,
when: env == 'staging' and ansible_architecture == 'x86_64',
general: {
verbose: 0,
build_json_dir: '/usr/share/osbs/',
openshift_required_version: 1.1.0,
},
default: {
username: "{{ osbs_koji_stg_username }}",
password: "{{ osbs_koji_stg_password }}",
use_kerberos: True,
kerberos_keytab: "/etc/krb5.osbs_{{osbs_url}}",
kerberos_principal: "osbs/{{osbs_url}}@{{ipa_realm}}",
openshift_url: 'https://{{ osbs_url }}/',
registry_uri: 'https://{{ docker_registry }}/v2',
source_registry_uri: 'https://{{ source_registry }}/v2',
build_host: '{{ osbs_url }}',
koji_root: 'http://{{ koji_root }}',
koji_hub: 'https://koji.stg.fedoraproject.org/kojihub',
sources_command: 'fedpkg sources',
build_type: 'prod',
authoritative_registry: 'registry.example.com',
vendor: 'Fedora Project',
verify_ssl: true,
use_auth: true,
builder_use_auth: true,
distribution_scope: 'private',
registry_api_versions: 'v2',
builder_openshift_url: 'https://{{osbs_url}}'
}
}
- {
role: osbs-client,
when: env == 'production' and ansible_architecture == 'x86_64',
general: {
verbose: 0,
build_json_dir: '/usr/share/osbs/',
openshift_required_version: 1.1.0,
},
default: {
username: "{{ osbs_koji_prod_username }}",
password: "{{ osbs_koji_prod_password }}",
koji_certs_secret: "koji",
openshift_url: 'https://{{ osbs_url }}/',
registry_uri: 'https://{{ docker_registry }}/v2',
source_registry_uri: 'https://{{ source_registry }}/v2',
build_host: '{{ osbs_url }}',
koji_root: 'http://{{ koji_root }}',
koji_hub: 'https://koji.fedoraproject.org/kojihub',
sources_command: 'fedpkg sources',
build_type: 'prod',
authoritative_registry: 'registry.example.com',
vendor: 'Fedora Project',
verify_ssl: true,
use_auth: true,
builder_use_auth: true,
distribution_scope: 'private',
registry_api_versions: 'v2',
builder_openshift_url: 'https://172.17.0.1:8443/'
}
}
2013-08-27 05:22:42 +00:00
tasks:
- include: "{{ tasks }}/2fa_client.yml"
when: not inventory_hostname.startswith('bkernel')
- include: "{{ tasks }}/motd.yml"
when: not inventory_hostname.startswith('bkernel')
2014-01-25 19:42:21 +00:00
- name: make sure kojid is running
service: name=kojid state=running enabled=yes
handlers:
- include: "{{ handlers }}/restart_services.yml"