mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
This isn't really a 'buildhw', but it's pretty close. It's an lpar on a power10 box. I'm making it a hw builder in staging because if we tried to make it a bvmhost and put vm's on it, we would need to setup macvtap, which would be fine, but extra complication where we don't really need it in staging currently. 01 will be created once we reconfigure the one thats currently serving as bvmhost-p10-01. Which will happen after we move 1/2 the builders off to a new bvmhost-p10-02 lpar on this same second power10. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
101 lines
3.3 KiB
YAML
101 lines
3.3 KiB
YAML
---
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/happy_birthday.yml"
|
|
vars:
|
|
myhosts: "buildhw:bkernel:buildhw_stg"
|
|
|
|
- name: make koji builder(s) on raw hw
|
|
hosts: buildhw:bkernel:buildhw_stg
|
|
remote_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
|
|
|
|
pre_tasks:
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
- name: override nbde_client-network-flush to work around bug
|
|
ansible.builtin.copy:
|
|
src: "{{ files }}/common/nbde_client-network-flush"
|
|
dest: /usr/bin/nbde_client-network-flush
|
|
owner: root
|
|
group: root
|
|
mode: 755
|
|
|
|
- name: tell NetworkManager we don't want any auto connections
|
|
ansible.builtin.copy:
|
|
src: "{{ files }}/common/noautodefault.conf"
|
|
dest: /etc/NetworkManager/conf.d/noautodefault.conf
|
|
owner: root
|
|
group: root
|
|
mode: 644
|
|
|
|
roles:
|
|
- base
|
|
- { role: nfs/client, mnt_dir: '/mnt/fedora_koji', nfs_src_dir: "{{ koji_hub_nfs }}", when: koji_hub_nfs is defined }
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/koji/ostree'
|
|
nfs_src_dir: 'fedora_ostree_content/ostree'
|
|
when: env != 'staging' and 'runroot' in group_names
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/koji/compose/ostree'
|
|
nfs_src_dir: 'fedora_ostree_content/compose/ostree'
|
|
when: env != 'staging' and 'runroot' in group_names
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/koji/ostree'
|
|
nfs_src_dir: 'fedora_ostree_content/ostree'
|
|
when: env != 'staging' and 'runroot' in group_names
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/koji/compose/ostree'
|
|
nfs_src_dir: 'fedora_ostree_content/compose/ostree'
|
|
when: env != 'staging' and 'runroot' in group_names
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/koji/ostree'
|
|
nfs_src_dir: 'fedora_ostree_content_stg/ostree'
|
|
when: env == 'staging' and 'runroot' in group_names
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/koji/compose/ostree'
|
|
nfs_src_dir: 'fedora_ostree_content_stg/compose/ostree'
|
|
when: env == 'staging' and 'runroot' in group_names
|
|
|
|
- koji_builder
|
|
|
|
- role: bkernel
|
|
when: "'bkernel' in group_names"
|
|
|
|
- { role: linux-system-roles.nbde_client, when: "inventory_hostname.startswith(('bkernel', 'buildhw'))" }
|
|
- { role: serial-console, when: "inventory_hostname.startswith(('bkernel', 'buildhw-x86'))" }
|
|
- hosts
|
|
- ipa/client
|
|
- role: sudo
|
|
when: not inventory_hostname.startswith(('bkernel', 'buildhw-x86-01.rdu3'))
|
|
|
|
- role: keytab/service
|
|
kt_location: /etc/kojid/kojid.keytab
|
|
service: compile
|
|
# push built Flatpaks to candidate registry
|
|
- role: login-registry
|
|
candidate_registry: "candidate-registry.fedoraproject.org"
|
|
candidate_registry_osbs_username: "{{candidate_registry_osbs_prod_username}}"
|
|
candidate_registry_osbs_password: "{{candidate_registry_osbs_prod_password}}"
|
|
when: env == "production"
|
|
- role: login-registry
|
|
candidate_registry: "candidate-registry.stg.fedoraproject.org"
|
|
candidate_registry_osbs_username: "{{candidate_registry_osbs_stg_username}}"
|
|
candidate_registry_osbs_password: "{{candidate_registry_osbs_stg_password}}"
|
|
when: env == "staging"
|
|
|
|
tasks:
|
|
- name: make sure kojid is running
|
|
service: name=kojid state=started enabled=yes
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|