From 8212fc243cb184a552bd888d5c0b06e4cf1c95ac Mon Sep 17 00:00:00 2001 From: Tobias Hachmer Date: Fri, 22 Mar 2019 22:06:26 +0100 Subject: [PATCH] Delete old Playbooks; update Playbooks --- playbooks/firmware-build-server.yml | 5 +- playbooks/gateways.yml | 5 +- playbooks/localtestvm-meshing.yml | 9 ---- playbooks/localtestvm-provide.yml | 73 ----------------------------- playbooks/mesh-services.yml | 2 +- playbooks/meshing.yml | 7 --- playbooks/monitoring.yml | 5 +- playbooks/servers.yml | 7 --- 8 files changed, 10 insertions(+), 103 deletions(-) delete mode 100755 playbooks/localtestvm-meshing.yml delete mode 100755 playbooks/localtestvm-provide.yml delete mode 100755 playbooks/meshing.yml delete mode 100755 playbooks/servers.yml diff --git a/playbooks/firmware-build-server.yml b/playbooks/firmware-build-server.yml index 80db473..ba82552 100755 --- a/playbooks/firmware-build-server.yml +++ b/playbooks/firmware-build-server.yml @@ -1,7 +1,8 @@ #!/usr/bin/ansible-playbook +--- +- name: Manage firmware buid servers + hosts: ffmwu-build-servers -- hosts: ffmwu-build-servers - remote_user: admin roles: - prerequisites - server-apt-repos diff --git a/playbooks/gateways.yml b/playbooks/gateways.yml index 85be599..08dff0a 100755 --- a/playbooks/gateways.yml +++ b/playbooks/gateways.yml @@ -1,7 +1,8 @@ #!/usr/bin/ansible-playbook +--- +- name: Manage Freifunk Gateways + hosts: ffmwu-gateways -- hosts: ffmwu-gateways - remote_user: admin roles: - prerequisites - server-apt-repos diff --git a/playbooks/localtestvm-meshing.yml b/playbooks/localtestvm-meshing.yml deleted file mode 100755 index 2de3951..0000000 --- a/playbooks/localtestvm-meshing.yml +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/ansible-playbook - -- include: loctevm-provide.yml - -- hosts: test-vms - remote_user: admin - roles: - - prerequisites - - ffmwu-meshing diff --git a/playbooks/localtestvm-provide.yml b/playbooks/localtestvm-provide.yml deleted file mode 100755 index 6f75733..0000000 --- a/playbooks/localtestvm-provide.yml +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/ansible-playbook -# localhost (aka 127.0.0.1) is the hypervisor (hard-coded) - -- hosts: test-vms -#- hosts: local-test-vm.ffmwu.local - gather_facts: False -# remote_user: root - - vars: - - vm_path: "{{ lookup('env','HOME') }}/tmp/ffmwu-loctevm" - - tasks: - - name: ensure VM dir and vm image dir - file: path={{ vm_path }} state=directory mode=0755 - delegate_to: 127.0.0.1 # local action - - - name: remove old image file when asked to reset VM - file: path={{ vm_path }}/loctevm.img state=absent - when: vm_reset|default(False) - delegate_to: 127.0.0.1 # local action - - - name: ensure image file # FIXME: change to rm + recreate - command: fallocate -l 5G {{ vm_path }}/loctevm.img # 15G? size? - args: - creates: "{{ vm_path }}/loctevm.img" - delegate_to: 127.0.0.1 # local action - - - name: correct access rights of image file - file: mode=0666 path={{ vm_path }}/loctevm.img state=file - delegate_to: 127.0.0.1 # local action - - - name: get and prepare debian image file - include: include/loctevm-provide-iso.inc.yml - - - name: define Vnd activate Vnet (if not already) - include: include/loctevm-provide-net.inc.yml - - - name: define VM (if not already) - include: include/loctevm-provide-vm.inc.yml - - - name: create VM - should start OS installation - might take looong time - virt: - state: running - name: "{{ inventory_hostname }}" - register: virt_run - delegate_to: 127.0.0.1 # local action - - - name: wait for port 80 to appear (after reboot after OS installation) - wait_for: host={{ansible_host}} port=80 state=started timeout=2500 - delegate_to: 127.0.0.1 # local action - - - block: - - name: ensure absence of outdated local known-hosts entry - known_hosts: host={{ansible_host}} state=absent - delegate_to: 127.0.0.1 # local action - - - name: do dummy connect to ensure new local known host entry - command: ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no hein@{{ansible_host}} true - delegate_to: 127.0.0.1 # local action - changed_when: False - failed_when: False - - when: virt_run.changed - # block end - -- hosts: test-vms - remote_user: hein - gather_facts: False -# become: True - - tasks: - - name: prepare VM (if not already) - include: include/loctevm-provide-prereq.inc.yml diff --git a/playbooks/mesh-services.yml b/playbooks/mesh-services.yml index c3e45de..d98727e 100755 --- a/playbooks/mesh-services.yml +++ b/playbooks/mesh-services.yml @@ -1,5 +1,5 @@ #!/usr/bin/ansible-playbook - +--- - name: Manage Mesh Services Servers. hosts: ffmwu-mesh-services diff --git a/playbooks/meshing.yml b/playbooks/meshing.yml deleted file mode 100755 index 1413540..0000000 --- a/playbooks/meshing.yml +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/ansible-playbook - -- hosts: meshing-srv - remote_user: admin - roles: - - prerequisites - - ffmwu-meshing diff --git a/playbooks/monitoring.yml b/playbooks/monitoring.yml index b03d5e9..570549e 100755 --- a/playbooks/monitoring.yml +++ b/playbooks/monitoring.yml @@ -1,7 +1,8 @@ #!/usr/bin/ansible-playbook +--- +- name: Manage Monitoring Server + hosts: ffmwu-monitoring -- hosts: ffmwu-monitoring - remote_user: admin roles: - prerequisites - server-apt-repos diff --git a/playbooks/servers.yml b/playbooks/servers.yml deleted file mode 100755 index fe6de2c..0000000 --- a/playbooks/servers.yml +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/ansible-playbook - -- hosts: ff-servers - remote_user: admin - roles: - - prerequisites - - ffmwu-server