-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
36 lines (26 loc) · 1.08 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
#### Variables ####
export ROOT_DIR ?= $(PWD)
export UERANSIM_ROOT_DIR ?= $(ROOT_DIR)
export ANSIBLE_NAME ?= ansible-ueransim
export HOSTS_INI_FILE ?= hosts.ini
export EXTRA_VARS ?= ""
#### Start Ansible ####
ueransim-ansible:
export ANSIBLE_NAME=$(ANSIBLE_NAME); \
sh $(UERANSIM_ROOT_DIR)/scripts/ansible ssh-agent bash
#### a. Debugging ####
ueransim-pingall:
ansible-playbook -i $(HOSTS_INI_FILE) $(UERANSIM_ROOT_DIR)/pingall.yml \
--extra-vars $(EXTRA_VARS)
#### b. Provision ueransim ####
ueransim-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(UERANSIM_ROOT_DIR)/simulator.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS) -v
#### c. Start the simulator
ueransim-run:
ansible-playbook -i $(HOSTS_INI_FILE) $(UERANSIM_ROOT_DIR)/simulator.yml --tags start \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
#### d. Remove ueransim ####
ueransim-uninstall:
ansible-playbook -i $(HOSTS_INI_FILE) $(UERANSIM_ROOT_DIR)/simulator.yml --tags uninstall \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)