aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Isom <kyle@cloudflare.com>2017-09-11 15:34:26 -0700
committerKyle Isom <kyle@cloudflare.com>2017-09-11 15:36:13 -0700
commit6a75ad864f4d1f3e563e25cf097c85f2aa7cee6c (patch)
tree0493d4e1353c848ac95f81cb3a2c1e437d1c8746
parent6b94937a3ace0e9ef71bd6b078d0fa3325e04709 (diff)
downloadansible-6a75ad864f4d1f3e563e25cf097c85f2aa7cee6c.tar.gz
ansible-6a75ad864f4d1f3e563e25cf097c85f2aa7cee6c.tar.bz2
ansible-6a75ad864f4d1f3e563e25cf097c85f2aa7cee6c.zip
Start work to make this useful for more machines.
-rw-r--r--Makefile8
-rw-r--r--bragi.yaml (renamed from laptop.yaml)0
-rw-r--r--forge.yaml6
-rw-r--r--hosts1
-rw-r--r--roles/base/tasks/repos.yaml22
5 files changed, 28 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index fcc356e..2f6ed27 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
ARCHIVE := ansible.tar.gz
+HOST ?= $(shell hostname -s)
+
.PHONY: all
all: sync
@@ -10,7 +12,7 @@ check-tree:
# sync applies the Ansible configuration.
.PHONY: sync
sync:
- ANSIBLE_NOCOLOR=1 ansible-playbook --ask-vault-pass -K -i hosts laptop.yaml
+ ANSIBLE_NOCOLOR=1 ansible-playbook --ask-vault-pass -K -i hosts $(HOSTS).yaml
# snapshot does the following:
# 1. clean the tree (to remove any existing snapshots).
@@ -34,3 +36,7 @@ $(ARCHIVE):
clean:
rm -f $(ARCHIVE)
rm -f *.retry
+
+.PHONY: whoami
+whoami:
+ @echo "$(HOST)"
diff --git a/laptop.yaml b/bragi.yaml
index 4ce683d..4ce683d 100644
--- a/laptop.yaml
+++ b/bragi.yaml
diff --git a/forge.yaml b/forge.yaml
new file mode 100644
index 0000000..c2f8243
--- /dev/null
+++ b/forge.yaml
@@ -0,0 +1,6 @@
+- hosts: forge.wntrmute.net
+ connection: ssh
+ roles:
+ - base
+ - devtools
+
diff --git a/hosts b/hosts
index 2fbb50c..bcc37a2 100644
--- a/hosts
+++ b/hosts
@@ -1 +1,2 @@
localhost
+forge.wntrmute.net
diff --git a/roles/base/tasks/repos.yaml b/roles/base/tasks/repos.yaml
index b209e63..0b4e6fe 100644
--- a/roles/base/tasks/repos.yaml
+++ b/roles/base/tasks/repos.yaml
@@ -1,15 +1,21 @@
-# - name: add kyle's repo key
-# become: true
-# apt_key:
-# id: 0x1F8B07B64401FC2C
-# url: https://keys.kyleisom.net/4401FC2C/4401FC2C.asc
-# state: present
-# validate_certs: yes
+- name: ensure apt-transport-https is available
+ become: true
+ apt:
+ name: "{{item}}"
+ state: present
+ with_items:
+ - apt-transport-https
+
+- name: add kyle's repo key
+ become: true
+ apt_key:
+ url: https://keys.kyleisom.net/4401FC2C/4401FC2C.asc
+ state: present
+ validate_certs: yes
- name: add kyle's repo
become: true
apt_repository:
repo: deb https://apt.kyleisom.net/ jessie main binary
- filename: kyle
state: present
validate_certs: yes