Skip to content

Commit

Permalink
docs: fix usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
IaroslavR committed Apr 30, 2023
1 parent cac2a65 commit 3281d4f
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/cachuperia/ansible-role-server-bootstrap.git
scm: git
version: v1.1.0
```

Install role:

```shell
ansible-playbook playbook.yml --extra-vars "ansible_sudo_pass=<sudo password>" --tags "<tag1>,<tag2>" --skip-tags "<tag>"
ansible-galaxy install -r requirements.yml
```

Create `playbook.yml`:

```yaml
# playbook.yml
- hosts: servers
roles:
- src: git+ssh://[email protected]/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=<sudo password>" --tags "<tag1>,<tag2>" --skip-tags "<tag>"
```

## Contributing
Expand Down

0 comments on commit 3281d4f

Please sign in to comment.