mKeRix/ansible-playbooks

First attempt

Alfiegerner opened this issue · 6 comments

Thanks Heiko for these. Here's my output on first attempt:

  1. suggest change git clone git@github.com:mKeRix/ansible-playbooks.gi to git clone https://github.com/mKeRix/ansible-playbooks.git : http for users with out git public key installed
    2: Error on roles requirement:
pi@homesystems:~/roomassistant.v2/ansible-playbooks$ ansible-galaxy install -r requirements.yml
- downloading role 'roles', owned by
 [WARNING]: - roles was NOT installed successfully: Content has no field named
'owner'

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

Hopefully will have some time to look into later, adding here in case I dont' get back to it today.

Fixed the no owner issue in number 2 by updating to ansible 2.9

-- Typo on point 4 on the ansible install docs about creating in hosts file: host.yml should be hosts.yml

Couln't work out why ansible-playbook -i hosts.yml -u pi room-assistant.yml was resulting in no matching hosts: took me a surprisingly long time to work this out :)

Successully re-installed on a couple of pi-zeros, all looking good.

Found how to avoid passwords with:

vars:
    ansible_user: pi
    ansible_password: #plaintext or encyrpted Vault 

And also found how to stop / start / restart the services across all nodes using ansible commands and defining a group in /etc/ansible/hosts.

Altogether love it - just what we needed, thank you.

I fixed the docs as per your hints, thanks! Glad you got it working and also found out a few more nice commands for Ansible. :)

Hey @mKeRix I think the ansible_user and ansible_password would be extremely helpful to have in the example hosts.yml file. I spent the better part of 3 hours today trying to figure out why authentication was failing even though I could ssh directly to them. Then I stumbled on this thread.

Some of us are newbies when it comes to ansible and this would have saved me some headaches.... just a thought.

@paulrbeers Thanks for the suggestion, I added a note about this to the README!