Skip to content

Commit fdaa511

Browse files
committed
Makefile: remove ansible_python_interpreter
We can now set the Python Interpreter globally in the ansible.cfg and with Kconfig or cli. Drop support for the calls where ansible-playbook was specifying the interpreter with ansible_python_interpreter inventory variable. Reviewed-by: Luis Chamberlain <[email protected]> Signed-off-by: Daniel Gomez <[email protected]>
1 parent 51ef1ce commit fdaa511

15 files changed

+20
-51
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,13 @@ $(KDEVOPS_HOSTS): .config ansible.cfg $(KDEVOPS_HOSTS_TEMPLATE)
228228
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
229229
--inventory localhost, \
230230
$(KDEVOPS_PLAYBOOKS_DIR)/gen_hosts.yml \
231-
-e 'ansible_python_interpreter=/usr/bin/python3' \
232231
--extra-vars=@./extra_vars.yaml
233232

234233
DEFAULT_DEPS += $(KDEVOPS_NODES)
235234
$(KDEVOPS_NODES) $(KDEVOPS_VAGRANT): .config ansible.cfg $(KDEVOPS_NODES_TEMPLATE)
236235
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
237236
--inventory localhost, \
238237
$(KDEVOPS_PLAYBOOKS_DIR)/gen_nodes.yml \
239-
-e 'ansible_python_interpreter=/usr/bin/python3' \
240238
--extra-vars=@./extra_vars.yaml
241239

242240
DEFAULT_DEPS += $(LOCALHOST_SETUP_WORK)

Makefile.build_qemu

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,27 @@ qemu: $(KDEVOPS_EXTRA_VARS)
2323
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
2424
--inventory localhost, \
2525
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
26-
-e 'ansible_python_interpreter=/usr/bin/python3' \
2726
--extra-vars=@./extra_vars.yaml
2827
PHONY += qemu
2928

3029
qemu-install: $(KDEVOPS_EXTRA_VARS)
3130
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
3231
--inventory localhost, \
3332
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
34-
-e 'ansible_python_interpreter=/usr/bin/python3' \
3533
--extra-vars=@./extra_vars.yaml --tags vars,install
3634
PHONY += qemu-install
3735

3836
qemu-configure: $(KDEVOPS_EXTRA_VARS)
3937
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
4038
--inventory localhost, \
4139
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
42-
-e 'ansible_python_interpreter=/usr/bin/python3' \
4340
--extra-vars=@./extra_vars.yaml --tags vars,configure
4441
PHONY += qemu-configure
4542

4643
qemu-build: $(KDEVOPS_EXTRA_VARS)
4744
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
4845
--inventory localhost, \
4946
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
50-
-e 'ansible_python_interpreter=/usr/bin/python3' \
5147
--extra-vars=@./extra_vars.yaml --tags vars,build
5248
PHONY += qemu-build
5349

Makefile.hypervisor-tunings

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ kdevops_hypervisor_tunning: $(KDEVOPS_EXTRA_VARS)
1717
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
1818
--inventory localhost, \
1919
$(KDEVOPS_PLAYBOOKS_DIR)/hypervisor-tuning.yml \
20-
-e 'ansible_python_interpreter=/usr/bin/python3' \
2120
--extra-vars=@./extra_vars.yaml
2221
PHONY += kdevops_hypervisor_tunning
2322

Makefile.kdevops

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,24 @@ PHONY := kdevops_all
1111
kdevops_terraform_deps:
1212
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
1313
--inventory localhost, \
14-
$(KDEVOPS_PLAYBOOKS_DIR)/install_terraform.yml \
15-
-e 'ansible_python_interpreter=/usr/bin/python3'
14+
$(KDEVOPS_PLAYBOOKS_DIR)/install_terraform.yml
1615
PHONY += kdevops_terraform_deps
1716

1817
kdevops_vagrant_install_vagrant:
1918
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
2019
--inventory localhost, \
21-
$(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant.yml \
22-
-e 'ansible_python_interpreter=/usr/bin/python3'
20+
$(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant.yml
2321

2422
kdevops_install_libvirt:
2523
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
2624
--inventory localhost, \
27-
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_configuration=True" \
28-
-e 'ansible_python_interpreter=/usr/bin/python3'
25+
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_configuration=True"
2926

3027
kdevops_configure_libvirt:
3128
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
3229
--inventory localhost, \
3330
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_install=True" \
34-
-e 'running_user=$(USER)' \
35-
-e 'ansible_python_interpreter=/usr/bin/python3'
31+
-e 'running_user=$(USER)'
3632

3733
kdevops_vagrant_deps: \
3834
kdevops_vagrant_install_vagrant \
@@ -45,25 +41,22 @@ KDEVOPS_VAGRANT_WORK := kdevops_vagrant_deps
4541
kdevops_vagrant_boxes:
4642
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
4743
--inventory localhost, \
48-
$(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant_boxes.yml \
49-
-e 'ansible_python_interpreter=/usr/bin/python3'
44+
$(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant_boxes.yml
5045
PHONY += kdevops_vagrant_boxes
5146
KDEVOPS_VAGRANT_WORK += kdevops_vagrant_boxes
5247

5348
kdevops_verify_libvirt_user:
5449
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
5550
--inventory localhost, \
56-
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "only_verify_user=True" \
57-
-e 'ansible_python_interpreter=/usr/bin/python3'
51+
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "only_verify_user=True"
5852

5953
PHONY += kdevops_verify_libvirt_user
6054
KDEVOPS_VAGRANT_WORK += kdevops_verify_libvirt_user
6155

6256
kdevops_libvirt_storage_pool_create:
6357
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
6458
--inventory localhost, \
65-
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_storage_pool_create.yml \
66-
-e 'ansible_python_interpreter=/usr/bin/python3'
59+
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_storage_pool_create.yml
6760

6861
PHONY += kdevops_libvirt_storage_pool_create
6962
KDEVOPS_VAGRANT_WORK += kdevops_libvirt_storage_pool_create

Makefile.linux-mirror

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ kdevops_linux_mirror: $(KDEVOPS_EXTRA_VARS)
2929
--inventory localhost, \
3030
--tags vars,mirror \
3131
$(KDEVOPS_PLAYBOOKS_DIR)/linux-mirror.yml \
32-
-e 'ansible_python_interpreter=/usr/bin/python3' \
3332
--extra-vars=@./extra_vars.yaml
3433
PHONY += kdevops_linux_mirror
3534

@@ -42,7 +41,6 @@ mirror-status: $(KDEVOPS_EXTRA_VARS)
4241
--inventory localhost, \
4342
--tags vars,mirror-status \
4443
$(KDEVOPS_PLAYBOOKS_DIR)/linux-mirror.yml \
45-
-e 'ansible_python_interpreter=/usr/bin/python3' \
4644
--extra-vars=@./extra_vars.yaml
4745

4846
PHONY += mirror-status

Makefile.postfix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ kdevops_postfix_setup_relay: $(KDEVOPS_EXTRA_VARS)
1010
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
1111
--inventory localhost, \
1212
$(KDEVOPS_PLAYBOOKS_DIR)/postfix_relay_host.yml \
13-
-e 'ansible_python_interpreter=/usr/bin/python3' \
1413
--extra-vars=@./extra_vars.yaml
1514
PHONY += kdevos_postfix_setup_relay
1615
ANSIBLE_EXTRA_ARGS += $(POSTFIX_SETUP_ARGS)

scripts/archive.Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ ci-archive:
1616
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
1717
--inventory localhost, \
1818
playbooks/kdevops_archive.yml \
19-
-e 'ansible_python_interpreter=/usr/bin/python3' \
2019
--extra-vars '{ $(ARCHIVE_DYNAMIC_RUNTIME_VARS) }' \
2120
--extra-vars=@./extra_vars.yaml
2221
endif

scripts/dynamic-pci-kconfig.Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ dynamic_pcipassthrough_kconfig:
4545
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
4646
--inventory localhost, \
4747
playbooks/gen-pci-kconfig.yml \
48-
--extra-vars '{ $(PCIE_RUNTIME_VARS) }' \
49-
-e 'ansible_python_interpreter=/usr/bin/python3'
48+
--extra-vars '{ $(PCIE_RUNTIME_VARS) }'
5049

5150
dynamic-kconfig-pci-help:
5251
@echo "dynconfig-pci - enables only pci dynamically generated kconfig content"

scripts/guestfs.Makefile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,41 +54,37 @@ KDEVOPS_PROVISION_DESTROY_METHOD := destroy_guestfs
5454
libvirt_pcie_passthrough_permissions:
5555
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
5656
--inventory localhost, \
57-
playbooks/libvirt_pcie_passthrough.yml \
58-
-e 'ansible_python_interpreter=/usr/bin/python3'
57+
playbooks/libvirt_pcie_passthrough.yml
5958

6059
$(KDEVOPS_PROVISIONED_SSH):
6160
$(Q)if [[ "$(CONFIG_KDEVOPS_SSH_CONFIG_UPDATE)" == "y" ]]; then \
6261
ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
6362
--inventory localhost, \
6463
playbooks/update_ssh_config_guestfs.yml \
65-
--extra-vars=@./extra_vars.yaml \
66-
-e 'ansible_python_interpreter=/usr/bin/python3' ;\
67-
LIBVIRT_DEFAULT_URI=$(CONFIG_LIBVIRT_URI) $(TOPDIR)/scripts/update_ssh_config_guestfs.py; \
64+
--extra-vars=@./extra_vars.yaml; \
65+
LIBVIRT_DEFAULT_URI=$(CONFIG_LIBVIRT_URI) \
66+
$(TOPDIR)/scripts/update_ssh_config_guestfs.py; \
6867
fi
69-
$(Q)ansible $(ANSIBLE_VERBOSE) -i hosts all -e 'ansible_python_interpreter=/usr/bin/python3' -m wait_for_connection
68+
$(Q)ansible $(ANSIBLE_VERBOSE) -i hosts all -m wait_for_connection
7069
$(Q)touch $(KDEVOPS_PROVISIONED_SSH)
7170

7271
install_libguestfs:
7372
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
7473
--inventory localhost, \
7574
playbooks/bringup_guestfs.yml \
76-
-e 'ansible_python_interpreter=/usr/bin/python3' \
7775
--extra-vars=@./extra_vars.yaml \
7876
--tags install-deps
7977

8078
bringup_guestfs: $(GUESTFS_BRINGUP_DEPS)
8179
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
8280
--inventory localhost, \
8381
playbooks/bringup_guestfs.yml \
84-
-e 'ansible_python_interpreter=/usr/bin/python3' \
8582
--extra-vars=@./extra_vars.yaml \
8683
--tags config-check,network,storage-pool-path
8784
$(Q)$(TOPDIR)/scripts/bringup_guestfs.sh
8885
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
8986
--inventory localhost, \
9087
playbooks/bringup_guestfs.yml \
91-
-e 'ansible_python_interpreter=/usr/bin/python3' \
9288
--extra-vars=@./extra_vars.yaml \
9389
--tags console-permissions
9490
PHONY += bringup_guestfs

scripts/install-menuconfig-deps.Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ menuconfig-deps:
44
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
55
--inventory localhost, \
66
$(KDEVOPS_PLAYBOOKS_DIR)/install-menuconfig-deps.yml \
7-
-e 'ansible_python_interpreter=/usr/bin/python3' \
87
-e 'kdevops_first_run=True'
98
PHONY += menuconfig-deps
109

0 commit comments

Comments
 (0)