39 lines
821 B
YAML
39 lines
821 B
YAML
---
|
|
- name: Install packages
|
|
ansible.builtin.package:
|
|
name: "{{ item }}"
|
|
state: installed
|
|
with_items:
|
|
- mock
|
|
- rpm-build
|
|
- rpmlint
|
|
|
|
- name: Create directory structure
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
mode: "0755"
|
|
with_items:
|
|
- /export/rpmbuild
|
|
- /export/rpmbuild/SOURCES
|
|
- /export/rpmbuild/SPECS
|
|
- /export/rpmbuild/SRPMS
|
|
|
|
- name: Link data directory
|
|
ansible.builtin.file:
|
|
dest: /srv/rpmbuild
|
|
src: /export/rpmbuild
|
|
state: link
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
follow: false
|
|
|
|
- name: Create .rpmmacros
|
|
ansible.builtin.copy:
|
|
dest: /root/.rpmmacros
|
|
content: "%_topdir /srv/rpmbuild\n"
|
|
mode: "0600"
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|