diff --git a/ansible.cfg b/ansible.cfg index 90a4b83..8d8c73d 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,5 @@ [defaults] -inventory = inventory.yml +inventory = ansible/inventory.yml nocows = 1 pattern = deprecation_warnings = False diff --git a/ansible-bind-primary.yml b/ansible/bind-primary.yml similarity index 100% rename from ansible-bind-primary.yml rename to ansible/bind-primary.yml diff --git a/ansible-doors.yml b/ansible/doors.yml similarity index 100% rename from ansible-doors.yml rename to ansible/doors.yml diff --git a/inventory.yml b/ansible/inventory.yml similarity index 100% rename from inventory.yml rename to ansible/inventory.yml diff --git a/ansible-kubernetes.yml b/ansible/kubernetes.yml similarity index 100% rename from ansible-kubernetes.yml rename to ansible/kubernetes.yml diff --git a/ssh_config b/ansible/ssh_config similarity index 98% rename from ssh_config rename to ansible/ssh_config index a75949b..b083e5e 100644 --- a/ssh_config +++ b/ansible/ssh_config @@ -1,4 +1,4 @@ -# Use `ansible-playbook ansible-update-ssh-config.yml` to update this file +# Use `ansible-playbook ansible/update-ssh-config.yml` to update this file # Use `ssh -F ssh_config ...` to connect to target machine or # Add `Include ~/path/to/this/kube/ssh_config` in your ~/.ssh/config Host backdoor 100.102.3.3 diff --git a/ansible-update-ssh-config.yaml b/ansible/update-ssh-config.yaml similarity index 92% rename from ansible-update-ssh-config.yaml rename to ansible/update-ssh-config.yaml index 1aff4ca..cedb02c 100644 --- a/ansible-update-ssh-config.yaml +++ b/ansible/update-ssh-config.yaml @@ -9,7 +9,7 @@ ansible.builtin.copy: dest: known_hosts content: | - # Use `ansible-playbook ansible-update-ssh-config.yml` to update this file + # Use `ansible-playbook ansible/update-ssh-config.yml` to update this file {% for host in groups['all'] | sort %} {{ lookup('ansible.builtin.pipe', 'ssh-keyscan -t ecdsa %s ' % ( hostvars[host].get('ansible_host', host))) }} # {{ host }} @@ -18,7 +18,7 @@ ansible.builtin.copy: dest: ssh_config content: | - # Use `ansible-playbook ansible-update-ssh-config.yml` to update this file + # Use `ansible-playbook ansible/update-ssh-config.yml` to update this file # Use `ssh -F ssh_config ...` to connect to target machine or # Add `Include ~/path/to/this/kube/ssh_config` in your ~/.ssh/config {% for host in groups['all'] | sort %} @@ -60,7 +60,7 @@ group: root mode: '0644' content: | - # Use `ansible-playbook ansible-update-ssh-config.yml` from https://git.k-space.ee/k-space/kube/ to update this file + # Use `ansible-playbook ansible/update-ssh-config.yml` from https://git.k-space.ee/k-space/kube/ to update this file {% for user in admins + extra_admins | unique | sort %} {% for line in lookup("ansible.builtin.file", user + ".keys").split("\n") %} {% if line.startswith("sk-") %} diff --git a/ansible-playbooks/zrepl/zrepl.yml b/ansible/zrepl/zrepl.yml similarity index 100% rename from ansible-playbooks/zrepl/zrepl.yml rename to ansible/zrepl/zrepl.yml diff --git a/ansible-playbooks/zrepl/zrepl_nas.yml.j2 b/ansible/zrepl/zrepl_nas.yml.j2 similarity index 100% rename from ansible-playbooks/zrepl/zrepl_nas.yml.j2 rename to ansible/zrepl/zrepl_nas.yml.j2 diff --git a/ansible-playbooks/zrepl/zrepl_offsite.yml.j2 b/ansible/zrepl/zrepl_offsite.yml.j2 similarity index 100% rename from ansible-playbooks/zrepl/zrepl_offsite.yml.j2 rename to ansible/zrepl/zrepl_offsite.yml.j2 diff --git a/known_hosts b/known_hosts index ef9b741..8ab08ee 100644 --- a/known_hosts +++ b/known_hosts @@ -1,4 +1,4 @@ -# Use `ansible-playbook ansible-update-ssh-config.yml` to update this file +# Use `ansible-playbook ansible/update-ssh-config.yml` to update this file 100.102.3.3 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBN4SifLddYAz8CasmFwX5TQbiM8atAYMFuDQRchclHM0sq9Pi8wRxSZK8SHON4Y7YFsIY+cXnQ2Wx4FpzKmfJYE= # backdoor 100.102.3.2 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE8/E7PDqTrTdU+MFurHkIPzTBTGcSJqXuv5n0Ugd/IlvOr2v+eYi3ma91pSBmF5Hjy9foWypCLZfH+vWMkV0gs= # frontdoor 100.102.3.1 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFcH8D2AhnESw3uu2f4EHBhT9rORQQJJ3TlbwN+kro5tRZsZk4p3MKabBiuCSZw2KWjfu0MY4yHSCrUUQrggJDM= # grounddoor