forked from linux-kdevops/kdevops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.linux-mirror
43 lines (33 loc) · 1.38 KB
/
Makefile.linux-mirror
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
# SPDX-License-Identifier: copyleft-next-0.3.1
ifeq (y,$(CONFIG_INSTALL_LOCAL_LINUX_MIRROR))
LINUX_MIRROR_ARGS :=
LINUX_MIRROR_ARGS += install_linux_mirror=True
LINUX_MIRROR_ARGS += defaults_xfsprogs_git='$(subst ",,$(CONFIG_DEFAULT_XFSPROGS_URL))'
LINUX_MIRROR_ARGS += defaults_xfsdump_git='$(subst ",,$(CONFIG_DEFAULT_XFSDUMP_URL))'
LINUX_MIRROR_ARGS += mirror_kdevops_url='$(subst ",,$(CONFIG_MIRROR_KDEVOPS_URL))'
LINUX_MIRROR_ARGS += mirror_torvalds_url='$(subst ",,$(CONFIG_MIRROR_TORVALDS_URL))'
MIRROR_CODE := $(TOPDIR)/playbooks/roles/linux-mirror/linux-mirror-systemd/
kdevops_linux_mirror: $(KDEVOPS_EXTRA_VARS)
$(Q)ansible-playbook --connection=local \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/linux-mirror.yml \
-e 'ansible_python_interpreter=/usr/bin/python3' \
--extra-vars=@./extra_vars.yaml
PHONY += kdevops_linux_mirror
mirror: $(KDEVOPS_EXTRA_VARS) kdevops_linux_mirror
$(Q)echo Setting up all mirrors on localhost
$(Q)make -C $(MIRROR_CODE) mirror
$(Q)make -C $(MIRROR_CODE) install
PHONY += mirror
mirror-status: $(KDEVOPS_EXTRA_VARS)
$(Q)make -C $(MIRROR_CODE) status
PHONY += mirror-status
ANSIBLE_EXTRA_ARGS += $(LINUX_MIRROR_ARGS)
LOCALHOST_SETUP_WORK += mirror
mirror-help-menu:
@echo "Mirror options:"
@echo "mirror - sets up systemd mirrors"
@echo "mirror-status - checks systemd mirrors status"
@echo ""
HELP_TARGETS += mirror-help-menu
endif