Commit 57394c9d authored by John Hackett's avatar John Hackett

Cleaning up makefile

parent 12a7310b
......@@ -4,6 +4,8 @@ destroy:
terraform apply -auto-approve
terraform plan
# docker run -it --rm -v $(PWD) terraform-lxd apply -auto-approve
......@@ -13,20 +15,29 @@ docker:
cat dockerfiles/inspec | docker build -t inspec -
cat dockerfiles/terraform-lxd | docker build -t terraform-lxd -
build: apply ansible
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i `terraform output -json | jq -r .ip.value`, playbook.yml -u root
build: apply ansible
rebuild: destroy apply ansible
cache: apt-cache gem-cache
cat dockerfiles/apt-cache-ng | docker build -t apt-cache-ng -
docker kill apt-cache-ng || true
docker rm apt-cache-ng || true
docker run -d -p 3142:3142 --name apt-cache-ng apt-cache-ng
cat dockerfiles/gem-cache | docker build -t gem-cache -
docker kill gem-cache || true
docker rm gem-cache || true
docker run -d -p 8808:8808 --name gem-cache gem-cache
mkdir -p .ruby-vendor
cd ./scripts/ && bundle install --path ../.ruby-vendor && bundle exec ruby provision.rb
......@@ -34,12 +45,15 @@ provision:
docker run -it --rm -v $(HOME)/.ssh:/keys -v $(PWD)/tests:/share inspec exec base_spec.rb -b ssh --no-create-lockfile --host=`terraform output -json | jq -r .ip.value` -i /keys/id_rsa
virt-builder debian-9 --root-password password:super-secret-password-123 --format qcow2
# virt-builder debian-9 --root-password password:super-secret-password-123 \
# --format qcow2 \
# --commands-from-file scripts/image-provision \
# --firstboot-command "systemctl enable sshd; systemctl start sshd; systemctl enable avahi-daemon; systemctl start avahi-daemon"
ssh root@`terraform output -json | jq -r .ip.value`
prep: image apt-cache
.PHONY: apt-cache converge
\ No newline at end of file
.PHONY: apt-cache converge
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment