diff --git a/hosts b/hosts index ee18095..e6a66ae 100644 --- a/hosts +++ b/hosts @@ -16,3 +16,44 @@ all: ansible_user: pi ansible_ssh_common_args: '-o StrictHostKeyChecking=no' ansible_ssh_private_key_file: ~/.ssh/id_rsa +blini: + hosts: + quimby + vars: + ansible_python_interpreter: /usr/bin/python3 + ansible_connection: ssh + ansible_sudo: true + ansible_become: true + ansible_user: pi + ansible_ssh_common_args: '-o StrictHostKeyChecking=no' + ansible_ssh_private_key_file: ~/.ssh/id_rsa +frinks: + hosts: + frink00: + frink01: + frink02: + frink03: + vars: + ansible_python_interpreter: /usr/bin/python3 + ansible_connection: ssh + ansible_sudo: true + ansible_become: true + ansible_user: pi + ansible_ssh_common_args: '-o StrictHostKeyChecking=no' + ansible_ssh_private_key_file: ~/.ssh/id_rsa +servers: + hosts: + ollital.de: + vasmani.de: + ollital.net: + ashkente.de: + vars: + ansible_python_interpreter: /usr/bin/python3 + ansible_connection: ssh + ansible_port: 1770 + ansible_sudo: true + ansible_become: true + ansible_user: olli + ansible_ssh_common_args: '-o StrictHostKeyChecking=no' + ansible_ssh_private_key_file: ~/.ssh/id_rsa + diff --git a/ping.yml b/ping.yml new file mode 100644 index 0000000..b40bb77 --- /dev/null +++ b/ping.yml @@ -0,0 +1,7 @@ +--- +- hosts: "{{ target }}" + gather_facts: false + remote_user: pi + roles: + - ping + diff --git a/roles/ping/tasks/main.yml b/roles/ping/tasks/main.yml new file mode 100644 index 0000000..352878c --- /dev/null +++ b/roles/ping/tasks/main.yml @@ -0,0 +1,5 @@ +- name: Blini Test + become_user: pi + command: ping -c2 ollital.de + + diff --git a/roles/updateservers/tasks/main.yml b/roles/updateservers/tasks/main.yml new file mode 100644 index 0000000..2ec3a7d --- /dev/null +++ b/roles/updateservers/tasks/main.yml @@ -0,0 +1,8 @@ +- name: Servers aktualisieren + become: true + apt: + upgrade: dist + update_cache: yes + cache_valid_time: 86400 + autoremove: yes + diff --git a/updateservers.yml b/updateservers.yml new file mode 100644 index 0000000..f6f0448 --- /dev/null +++ b/updateservers.yml @@ -0,0 +1,7 @@ +--- +- hosts: "{{ target }}" + gather_facts: false + remote_user: olli + roles: + - updateservers +