-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from cachuperia/CAC-4
docs: fix usage example
- Loading branch information
Showing
1 changed file
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|