Browse Source

Role für ping

updateservers für Remoteserver
master 0.1
Olli Graf 4 years ago
parent
commit
9094908c36
  1. 41
      hosts
  2. 7
      ping.yml
  3. 5
      roles/ping/tasks/main.yml
  4. 8
      roles/updateservers/tasks/main.yml
  5. 7
      updateservers.yml

41
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

7
ping.yml

@ -0,0 +1,7 @@
---
- hosts: "{{ target }}"
gather_facts: false
remote_user: pi
roles:
- ping

5
roles/ping/tasks/main.yml

@ -0,0 +1,5 @@
- name: Blini Test
become_user: pi
command: ping -c2 ollital.de

8
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

7
updateservers.yml

@ -0,0 +1,7 @@
---
- hosts: "{{ target }}"
gather_facts: false
remote_user: olli
roles:
- updateservers
Loading…
Cancel
Save