Browse Source

hosts ist YML.

apt plugin.
master
Olli Graf 4 years ago
parent
commit
297d97282c
  1. 1
      Projekte/ansible/ansible.cfg
  2. 31
      Projekte/ansible/hosts
  3. 10
      Projekte/ansible/roles/updatepi/tasks/main.yml

1
Projekte/ansible/ansible.cfg

@ -1,5 +1,6 @@
[defaults] [defaults]
inventory = hosts inventory = hosts
interpreter_python = auto_silent
[ssh_connection] [ssh_connection]
ssh_args = -o StrictHostKeyChecking=no ssh_args = -o StrictHostKeyChecking=no

31
Projekte/ansible/hosts

@ -1,15 +1,16 @@
brandine all:
clancy hosts:
martin brandine:
quimby clancy:
martin:
[all:vars] quimby:
gather_facts kirk:
ansible_python_interpreter=/usr/bin/python3 willie:
ansible_connection=ssh vars:
ansible_user=deploy ansible_python_interpreter: /usr/bin/python3
ansible_sudo=true ansible_connection: ssh
ansible_become=true ansible_sudo: true
ansible_user = pi ansible_become: true
ansible_ssh_common_args='-o StrictHostKeyChecking=no' ansible_user: pi
ansible_ssh_private_key_file=~/.ssh/id_rsa ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
ansible_ssh_private_key_file: ~/.ssh/id_rsa

10
Projekte/ansible/roles/updatepi/tasks/main.yml

@ -1,4 +1,10 @@
- name: PIs aktualisieren - name: PIs aktualisieren
command: /usr/bin/sh ~/bin/updatesys # command: /usr/bin/sh ~/bin/updatesys
become_user: pi # become_user: pi
become: true
apt:
upgrade: dist
update_cache: yes
cache_valid_time: 86400
autoremove: yes

Loading…
Cancel
Save