mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-14 17:50:06 -03:30
CI: make the ansible inventory a directory
Not constraining the inventory to .ini allows us to use dynamic inventory, which is needed for simplifying kubevirt jobs inventory. Also reduces the scope of the ANSIBLE_INVENTORY variable.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
INVENTORY=$(PWD)/../inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
|
||||
|
||||
init-packet:
|
||||
mkdir -p $(HOME)/.ssh
|
||||
echo $(PACKET_VM_SSH_PRIVATE_KEY) | base64 -d > $(HOME)/.ssh/id_rsa
|
||||
@@ -18,14 +16,13 @@ create-packet: init-packet
|
||||
-e test_id=$(TEST_ID) \
|
||||
-e branch="$(CI_COMMIT_BRANCH)" \
|
||||
-e pipeline_id="$(CI_PIPELINE_ID)" \
|
||||
-e inventory_path=$(INVENTORY)
|
||||
-e inventory_path=$(INVENTORY_DIR)
|
||||
|
||||
delete-packet: ;
|
||||
|
||||
create-vagrant:
|
||||
vagrant up
|
||||
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $(INVENTORY)
|
||||
|
||||
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $(INVENTORY_DIR)
|
||||
|
||||
delete-vagrant:
|
||||
vagrant destroy -f
|
||||
|
||||
Reference in New Issue
Block a user