This is a repository containing the Ansible configuration for the laptop-fleet of the Chaostreff Osnabrück.
As the very first step, you have to install your own key onto the machines (hopefully also part of the authenticated_keys for the playbook). Do that via:
ssh-copy-id user@ctreffosXXThen take a look into the hosts file, which details the specific group membership of the machines. It is strongly recommended to add the secondary_address property to the new device, as we have seen mDNS failures way too often. If you use this, you have to assign your own machine a static address inside the 10.13.37.0/24 subnet.
Create a file secrets.source and fill it with the following content:
export WIFI_SSID=<set-your-value-here>
export WIFI_PASSWORD=<set-your-value-here>...then source it:
. envsetup.source # to configure which inventory to use
ansible -m ping all # just to make you can reach them allansible-playbook site.yml --ask-become-passansible-playbook power-block.yml --ask-become-passThe inventory is using the mDNS advertised hostnames of the machines. While this saves us from configureing the inventovry with fixed IPv4 addresses, it may lead to problems, if the mDNS/WiFi-connection is not working properly. I would recommend you to start with the power-block.yml-playbook and rerun it until all machines are reachable.
- Never use
run_once: true, because due to the strategyfree, the task may be completed multiple times on different hosts, as they may start at different point of time. - Never use reboot or other power actions during a run - as
power-block.ymlwill retrict them and may cause the playbook to get stuck.