added make and playbook for installation
This commit is contained in:
parent
fc3638b109
commit
7c60ca302d
2 changed files with 48 additions and 0 deletions
26
Makefile
Normal file
26
Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
PKGNAME = uacme
|
||||
SPECFILE = $(PKGNAME).spec
|
||||
ARCH = $(shell rpm --eval "%{_arch}")
|
||||
RPMBUILD = $(shell rpm --eval "%{_builddir}")
|
||||
RPMSOURCE = $(shell rpm --eval "%{_sourcedir}")
|
||||
RPMDIR = $(shell rpm --eval "%{_rpmdir}")
|
||||
|
||||
version = $(shell egrep "^Version" $(SPECFILE) | awk '{ print $$2}')
|
||||
release = $(shell egrep "^Release" $(SPECFILE) | awk '{ print $$2}')
|
||||
|
||||
sourceurl = https://github.com/ndilieto/uacme/archive/refs/tags/upstream/$(version).tar.gz
|
||||
source = $(RPMSOURCE)/$(version).tar.gz
|
||||
|
||||
RPM = $(RPMDIR)/$(ARCH)/$(PKGNAME)-$(version)-$(release).$(ARCH).rpm
|
||||
|
||||
|
||||
$(RPM): $(SPECFILE) $(source)
|
||||
rpmbuild -bb $<
|
||||
|
||||
$(source):
|
||||
wget -O $@ $(sourceurl)
|
||||
|
||||
clean:
|
||||
rm $(RPM) $(source)
|
||||
|
||||
.PHONY: clean
|
22
install.yml
Normal file
22
install.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
- name: Install uacme rpm package
|
||||
hosts: linodes
|
||||
vars:
|
||||
rpm_location: /home/thrrgilag/rpmbuild/RPMS/x86_64
|
||||
rpm_file: uacme-1.7.3-1.x86_64.rpm
|
||||
|
||||
tasks:
|
||||
- name: ping host
|
||||
ansible.builtin.ping:
|
||||
|
||||
- name: upload rpm
|
||||
ansible.builtin.copy:
|
||||
src: "{{ rpm_location }}/{{ rpm_file }}"
|
||||
dest: /tmp
|
||||
|
||||
- name: install rpm
|
||||
ansible.builtin.dnf:
|
||||
name: /tmp/{{ rpm_file }}
|
||||
state: latest
|
||||
disable_gpg_check: yes
|
||||
become: yes
|
Loading…
Reference in a new issue