-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (30 loc) · 1.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
DOCKER_IMAGE=ansible
## https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html
VERSIONS=8 7 6
include Makefile.docker
PACKAGE_VERSION=0.1
DEBVERSIONS=8 7 6
include Makefile.package
check-version:
docker run --rm $(DOCKER_NAMESPACE)/$(DOCKER_IMAGE):$(VERSION) ansible --version|grep "^ansible "|sed 's/\[core //'|sed 's/\]//'|awk '{print $$2,""}'| tr -d '\n'
deb:
mkdir -p build/usr/sbin/
cp -Rf bin/* build/usr/sbin/
cp bin/ansible build/usr/sbin/ansible-playbook
cp bin/ansible build/usr/sbin/ansible-galaxy
cp bin/ansible build/usr/sbin/ansible-inventory
cp bin/ansible-vault build/usr/sbin/ansible-lint
$(foreach version,$(DEBVERSIONS), cp bin/ansible build/usr/sbin/ansible$(version);)
$(foreach version,$(DEBVERSIONS), cp bin/ansible build/usr/sbin/ansible-playbook$(version);)
$(foreach version,$(DEBVERSIONS), cp bin/ansible build/usr/sbin/ansible-galaxy$(version);)
$(foreach version,$(DEBVERSIONS), cp bin/ansible-vault build/usr/sbin/ansible-vault$(version);)
$(foreach version,$(DEBVERSIONS), cp bin/ansible-vault build/usr/sbin/ansible-lint$(version);)
run:
./bin/$(DOCKER_IMAGE) --version
install:
install bin/ansible $(prefix)/bin/ansible
ln -sfn $(prefix)/bin/ansible $(prefix)/bin/ansible-playbook
ln -sfn $(prefix)/bin/ansible $(prefix)/bin/ansible-galaxy
ln -sfn $(prefix)/bin/ansible $(prefix)/bin/ansible-inventory
install bin/ansible-vault $(prefix)/bin/ansible-vault
ln -sfn $(prefix)/bin/ansible-vault $(prefix)/bin/ansible-lint