Yet another role to bootstrap CoreOS for Ansible provisioning. As you might know, Ansible needs a Python interpreter on the server for most of the Ansible modules to work. There isn't one in CoreOS by default. So we're going to install PyPy on it.
This role is heavily influenced by the good work done in defunctzombie's ansible-coreos-bootstrap role. Only problem with it at the moment is that it's not very configurable. Also the syntax used in that role is a bit outdated.
None.
None.
ansible-galaxy install jzmch.bootstrap-coreos
Depending on your setup, this command installs the role to /etc/ansible/roles
directory. You might run into errors installing there, because it is owned by root. So make sure it is owned by your user.
sudo chown <user>:<group> /etc/ansible/roles
There are times when you want to install roles to the working directory where your other Ansible scripts are. You can do that by creating a local ansible.cfg
file into the root of your working directory (the place where you run Ansible). The file should contain at least these lines:
[defaults]
roles_path = roles/
Now when you run ansible-galaxy install jzmch.bootstrap-coreos
, it will be installed to ./roles/
directory.
You can also specify the roles path directly in the install command. But you still need to have the roles path setup in the Ansible configuration file in order for them to work.
# Variables and their default values as set in defaults/main.yml
pypy_dir: /home/core/lib/pypy
pypy_version: 5.3.1
ansible_python_interpreter: /home/core/bin/python
You should set the values for these in your inventory/group_vars/host_vars/playbook etc.
- hosts: servers
gather_facts: no
roles:
- jzmch.bootstrap-coreos
BSD