aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug.yml9
-rw-r--r--host_vars/template12
-rw-r--r--playbooks/debug.yml8
-rw-r--r--playbooks/init_vm.yml17
-rw-r--r--playbooks/init_vms.yml11
-rw-r--r--playbooks/site.yml9
-rw-r--r--playbooks/sshdns.yml12
l---------playbooks/templates1
-rw-r--r--playbooks/vmm.yml7
-rw-r--r--roles/ssh/tasks/generate_dns.yml8
-rw-r--r--roles/ssh/tasks/main.yml23
-rw-r--r--roles/ssh/templates/generate_dns.j224
-rw-r--r--roles/ssh/templates/sshd_config.j225
13 files changed, 0 insertions, 166 deletions
diff --git a/debug.yml b/debug.yml
deleted file mode 100644
index 05c4270..0000000
--- a/debug.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# debug.yml
-
-- name: Debug all variables
- hosts: servers
- tasks:
-
- - debug:
- var: hostvars[inventory_hostname]
diff --git a/host_vars/template b/host_vars/template
deleted file mode 100644
index 7eaa472..0000000
--- a/host_vars/template
+++ /dev/null
@@ -1,12 +0,0 @@
-hostname: required;string
-ip:
- in: required;string
- out: required;string
-
-virtual: required;bool
-
-vms:
- - name: required;string
- memory: required;string
- disks:
- - { size: required;string }
diff --git a/playbooks/debug.yml b/playbooks/debug.yml
deleted file mode 100644
index c87d8aa..0000000
--- a/playbooks/debug.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-
-- name: Debug
- hosts: all
- tasks:
-
- - debug:
- var: hostvars[ansible_host]
diff --git a/playbooks/init_vm.yml b/playbooks/init_vm.yml
deleted file mode 100644
index 2f6e027..0000000
--- a/playbooks/init_vm.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-# init_vm.yml
-
----
-
-- hosts: "{{ host }}"
- tasks:
-
- - include_role:
- name: vmm
- tasks_from: init_vm_alpine.yml
- when: groups["alpine"] | select("search", guest) | list | length > 0
-
- - include_role:
- name: vmm
- tasks_from: init_vm_openbsd.yml
- when: groups["openbsd"] | select("search", guest) | list | length > 0
diff --git a/playbooks/init_vms.yml b/playbooks/init_vms.yml
deleted file mode 100644
index 3da35dc..0000000
--- a/playbooks/init_vms.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# init_vm.yml
-# Initialize mutliple vms, with os-agnostic tasks
-
----
-
-- include: init_vm.yml
- vars:
- host: "{{ host }}"
- guest: "{{ item }}"
- loop: "{{ vms | select('search', 'iso') | list }}"
diff --git a/playbooks/site.yml b/playbooks/site.yml
deleted file mode 100644
index 0775b58..0000000
--- a/playbooks/site.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# site.yml
-# Deploy configuration to all servers.
-
-- hosts: servers
-
- roles:
- - { role : common }
- - { role: tools }
diff --git a/playbooks/sshdns.yml b/playbooks/sshdns.yml
deleted file mode 100644
index d343cf4..0000000
--- a/playbooks/sshdns.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# sshdns.yml
-# bind host to dns for ssh
-
----
-
-- hosts: localhost
- tasks:
-
- - include_role:
- name: ssh
- tasks_from: generate_dns
diff --git a/playbooks/templates b/playbooks/templates
deleted file mode 120000
index 564a409..0000000
--- a/playbooks/templates
+++ /dev/null
@@ -1 +0,0 @@
-../templates \ No newline at end of file
diff --git a/playbooks/vmm.yml b/playbooks/vmm.yml
deleted file mode 100644
index e0034ef..0000000
--- a/playbooks/vmm.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# vmm.yml
-# Init vmm iso for specified host.
-
-- hosts: "{{ host }}"
- roles:
- - vmm
diff --git a/roles/ssh/tasks/generate_dns.yml b/roles/ssh/tasks/generate_dns.yml
deleted file mode 100644
index 60a21bd..0000000
--- a/roles/ssh/tasks/generate_dns.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# ssh ~~ tasks/local_dns.yml
-
-- name: Generate template to localhost
- template:
- src: templates/generate_dns.j2
- dest: "{{ lookup('env', 'HOME') }}/.ssh/config.d/ssh_dns"
- delegate_to: 127.0.0.1
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml
deleted file mode 100644
index 0fc2dee..0000000
--- a/roles/ssh/tasks/main.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# ssh ~~ tasks/main.yml
-
----
-
-- name: Generate sshd configuration
- template:
- src: templates/sshd_config.j2
- dest: /etc/ssh/sshd_config
- owner: root
- group: "{{ group_root }}"
- mode: "0644"
-
-- name: Restart sshd
- service:
- name: sshd
- state: restarted
-
-- name: Check ssh connection
- wait_for:
- port: 22
- delay: 1
- state: started
diff --git a/roles/ssh/templates/generate_dns.j2 b/roles/ssh/templates/generate_dns.j2
deleted file mode 100644
index 5d58ae9..0000000
--- a/roles/ssh/templates/generate_dns.j2
+++ /dev/null
@@ -1,24 +0,0 @@
-
-# ssh configuration for dns ~~ ~/.ssh/.config.d/
-# managed by Ansible
-
-{% for h in groups["all"] %}
-{% set h = hostvars[h] %}
-{##}
-{% if h.ip is defined and h.services is defined %}
-{% set _port = h.services | selectattr("name", "equalto", "ssh") | map(attribute="port") | list | join(' ') %}
-{##}
-# {{ h.ansible_host }}
-
-Match originalhost {{ h.ansible_host }} exec "ls /sys/class/net/{{ _i.dcontroller }} && ! ping -c 1 -W 5 {{ h.ip.out }}"
- HostName {{ h.ip.in }}
- Port {{ _port }}
-
-Match originalhost {{ h.ansible_host }}
- HostName {{ h.ip.out }}
- Port {{ _port }}
- User root
-
-{% endif %}
-{##}
-{% endfor %}
diff --git a/roles/ssh/templates/sshd_config.j2 b/roles/ssh/templates/sshd_config.j2
deleted file mode 100644
index a11268e..0000000
--- a/roles/ssh/templates/sshd_config.j2
+++ /dev/null
@@ -1,25 +0,0 @@
-
-# ssh ~~ /etc/ssh/sshd_config
-# managed by Ansible
-
-# security
-PermitRootLogin yes
-MaxAuthTries 6
-MaxSessions 10
-
-# auth
-AuthorizedKeysFile .ssh/authorized_keys
-PasswordAuthentication no
-PermitEmptyPasswords no
-ClientAliveInterval 180
-
-
-{% if ansible_facts["os_family"] == "OpenBSD" or ansible_facts["os_family"] == "Alpine" %}
-Subsystem sftp /usr/libexec/sftp-server
-{% elif ansible_facts["os_family"] == "Debian" %}
-ChallengeResponseAuthentication no
-UsePAM yes
-PrintMotd no
-UsePrivilegeSeparation sandbox
-Subsystem sftp /usr/lib/ssh/sftp-server
-{% endif %}
remember that computers suck.