From 3281d4fe199b624a42392bf17d8ec1e0d6a01cb8 Mon Sep 17 00:00:00 2001 From: IaroslavR Date: Sun, 30 Apr 2023 16:19:08 +0100 Subject: [PATCH] docs: fix usage example --- README.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5986e7b..c3adb84 100644 --- a/README.md +++ b/README.md @@ -37,21 +37,38 @@ asdf_expected: 0.11.3 - **_python_** - Install/update `pyenv`, build Python `default_user_python_version`, and configure it as global for user. - **_vagrant_** - Install `virtualbox` and `vagrant` -### Example Playbook +### Usage Example + +Create `requirements.yml` file: + +```yaml +# requirements.yml +roles: + - src: git+ssh://git@github.com/cachuperia/ansible-role-server-bootstrap.git + scm: git + version: v1.1.0 +``` + +Install role: ```shell -ansible-playbook playbook.yml --extra-vars "ansible_sudo_pass=" --tags "," --skip-tags "" +ansible-galaxy install -r requirements.yml ``` +Create `playbook.yml`: + ```yaml # playbook.yml - hosts: servers roles: - - src: git+ssh://git@github.com/cachuperia/ansible-role-server-bootstrap.git - scm: git - version: v1.1.0 - vars: - default_user_python_version: 3.11.11 + - role: ansible-role-server-bootstrap + default_user_python_version: 3.11.11 +``` + +Run playbook: + +```shell +ansible-playbook playbook.yml --extra-vars "ansible_sudo_pass=" --tags "," --skip-tags "" ``` ## Contributing