https://github.com/sanderploegsma/homelab-ansible
https://github.com/sanderploegsma/homelab-ansible
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sanderploegsma/homelab-ansible
- Owner: sanderploegsma
- Created: 2023-05-06T05:38:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T21:32:55.000Z (8 months ago)
- Last Synced: 2025-01-10T14:02:14.192Z (6 months ago)
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Homelab automation with Ansible
## Requirements
- Ansible 10.5.0
Install Ansible collections using:
```sh
ansible-galaxy install -r requirements.yml
```## Troubleshooting
### A worker was found in a dead state
When running into an error like the following when running Ansible playbooks from macOS:
> +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. ERROR! A worker was found in a dead state
Make sure to set the following environment variable in your shell:
```sh
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```See the [Ansible FAQ](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#running-on-macos-as-a-target).
### GNU tar required
In case a playbook tries to unarchive a tarball on the Ansible controller when running macOS, it may complain about GNU tar missing:
> Command "/usr/bin/tar" detected as tar type bsd. GNU tar required.
```sh
brew install gnu-tar
``````sh
echo 'export PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.zshrc
```