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

Cleaning up makefile

parent 12a7310b
......@@ -4,6 +4,8 @@ destroy:
apply:
terraform apply -auto-approve
plan:
terraform plan
#
#docker-apply:
# 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:
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
apt-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
gem-cache:
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
provision:
mkdir -p .ruby-vendor
cd ./scripts/ && bundle install --path ../.ruby-vendor && bundle exec ruby provision.rb
......@@ -34,12 +45,15 @@ provision:
test:
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
image:
virt-builder debian-9 --root-password password:super-secret-password-123 --format qcow2
#image:
# 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:
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