rpm-build: Initial version of role

This commit is contained in:
Timo Makinen 2020-09-30 19:27:12 +00:00
parent d72fbc76dd
commit 703cf49eb5
2 changed files with 40 additions and 0 deletions

View file

@ -30,6 +30,7 @@
- role: kerberos/keytab
principals:
- "host/{{ inventory_hostname }}@FOO.SH"
- rpm-build
- web-build
tasks:

View file

@ -0,0 +1,39 @@
---
- name: install packages
package:
name: "{{ item }}"
state: installed
with_items:
- mock
- rpm-build
- name: create directory structure
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
file:
dest: /srv/rpmbuild
src: /export/rpmbuild
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
- name: create .rpmmacros
copy:
dest: /root/.rpmmacros
content: "%_topdir /srv/rpmbuild\n"
mode: 0600
owner: root
group: "{{ ansible_wheel }}"