31 lines
853 B
Makefile
31 lines
853 B
Makefile
SHELL := /bin/bash
|
|
.ONESHELL:
|
|
.SHELLFLAGS := -eu -o pipefail -c
|
|
|
|
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
ANSIBLE_DIR := $(abspath $(MAKEFILE_DIR)/../ansible)
|
|
|
|
.PHONY: all \
|
|
remove_node_user harden_nodes harden_ceph_nodes
|
|
|
|
all: harden_ceph_nodes
|
|
|
|
remove_node_user:
|
|
cd "$(ANSIBLE_DIR)" && \
|
|
ansible-playbook playbooks/node/remove_user.yml -i inventory.p22.ini \
|
|
-l "p22_nodes" \
|
|
-e '{"remove_user":"packer"}'
|
|
|
|
harden_nodes: remove_node_user
|
|
cd "$(ANSIBLE_DIR)" && \
|
|
ansible-playbook playbooks/harden/harden_node.yml -i inventory.before_p25105.ini \
|
|
-l "before_p25105_nodes" \
|
|
-e '{"ssh_port":25105}'
|
|
|
|
harden_ceph_nodes: harden_nodes
|
|
cd "$(ANSIBLE_DIR)" && \
|
|
ansible-playbook playbooks/harden/harden_node.yml -i inventory.ceph.ini \
|
|
-l "ceph_nodes" \
|
|
-e '{"ssh_port":22}'
|
|
|
|
# make -f 03_harden_vms.mk
|