Ansible files for provisioning linux servers, for software development.
$ ansible-playbook plays/name-of-playbook.yml -l name-of-local-machine --connection=local
Make sure your hosts file has the correct values.
Run the playbooks as a user that has sudo rights (without password).
- Ensure the server has a user with passwordless sudo rights, and that ansible is installed. Refer to the ansible-setup.sh file.
- Create the ansible.cfg file (refer to ansible.cfg.dist file), make sure that the "remote_user" variable is set to a user that has passwordless sudo rights.
- If you want to also create user accounts, then create users.json file in vars directory (refer to vars/users.json.dist).
- Run the dev-server-setup playbook (in this example we're adding roles defined by the tag "varnish")
$ ansible-playbook plays/dev-server-setup.yml -l hostname -t "varnish" --connection=local
- Ensure that the remote server has a user with passwordless sudo rights, and that ansible is installed. Refer to the ansible-setup.sh file.
- Ensure that the "remote_user" variable matches the user from step #1.
- Run the dev-server-setup playbook
$ ansible-playbook plays/dev-server-setup.yml -l hostname -t "varnish"