forked from linux-kdevops/kdevops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.kdevops
88 lines (71 loc) · 2.82 KB
/
Makefile.kdevops
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Perhaps you use a different location for these. These helpers
# allow your project to define these and just include this file.
KDEVOPS_TERRAFORM_DIR ?= terraform
KDEVOPS_PLAYBOOKS_DIR ?= playbooks
KDEVOPS_HOSTFILE ?= hosts
KDEVOPS_LOCAL_WORK :=
kdevops_all: kdevops_deps
PHONY := kdevops_all
kdevops_terraform_deps:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/install_terraform.yml \
-e 'ansible_python_interpreter=/usr/bin/python3'
PHONY += kdevops_terraform_deps
kdevops_vagrant_install_vagrant:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant.yml \
-e 'ansible_python_interpreter=/usr/bin/python3'
kdevops_install_libvirt:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_configuration=True" \
-e 'ansible_python_interpreter=/usr/bin/python3'
kdevops_configure_libvirt:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_install=True" \
-e 'running_user=$(USER)' \
-e 'ansible_python_interpreter=/usr/bin/python3'
kdevops_vagrant_deps: \
kdevops_vagrant_install_vagrant \
kdevops_install_libvirt \
kdevops_configure_libvirt
PHONY += kdevops_vagrant_deps
KDEVOPS_VAGRANT_WORK := kdevops_vagrant_deps
kdevops_vagrant_boxes:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant_boxes.yml \
-e 'ansible_python_interpreter=/usr/bin/python3'
PHONY += kdevops_vagrant_boxes
KDEVOPS_VAGRANT_WORK += kdevops_vagrant_boxes
kdevops_verify_libvirt_user:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "only_verify_user=True" \
-e 'ansible_python_interpreter=/usr/bin/python3'
PHONY += kdevops_verify_libvirt_user
KDEVOPS_VAGRANT_WORK += kdevops_verify_libvirt_user
kdevops_libvirt_storage_pool_create:
@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_storage_pool_create.yml \
-e 'ansible_python_interpreter=/usr/bin/python3'
PHONY += kdevops_libvirt_storage_pool_create
KDEVOPS_VAGRANT_WORK += kdevops_libvirt_storage_pool_create
kdevops_deps: kdevops_terraform_deps $(KDEVOPS_VAGRANT_WORK) $(KDEVOPS_DEPS)
@echo Installed dependencies
PHONY += kdevops_deps
kdevops-deps: kdevops_deps
PHONY += kdevops-deps
kdevops_terraform_clean:
@$(Q)if [ -d $(KDEVOPS_TERRAFORM_DIR) ]; then \
make -C $(KDEVOPS_TERRAFORM_DIR) clean ; \
fi
PHONY += kdevops_terraform_clean
kdevops_clean: kdevops_terraform_clean
@echo Cleaned up
PHONY += kdevops_clean
.PHONY: $(PHONY)