Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make formatting changes to `ansible`, `ansible-galaxy`, and `ansible-vault` for the sake of consistency with other cheatsheets.
- Loading branch information
1 parent
68abb45
commit 509205d
Showing
3 changed files
with
18 additions
and
26 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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
tags: [ orchestrating ] | ||
tags: [ orchestration ] | ||
--- | ||
# Run a command on multiple instances at once - using `servers` group from `inventory.yml` | ||
|
||
# To run a command on multiple instances at once - using `servers` group from `inventory.yml`: | ||
ansible -u ansible -i inventory.yml servers -m shell -a "ls /var" |
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 |
---|---|---|
@@ -1,26 +1,20 @@ | ||
--- | ||
tags: [ orchestrating ] | ||
tags: [ orchestration ] | ||
--- | ||
# Install a role: | ||
# To install a role: | ||
ansible-galaxy install <user>.<role> | ||
|
||
`ansible-galaxy install {{username}}.{{role_name}}` | ||
# To remove a role: | ||
ansible-galaxy remove <user>.<role> | ||
|
||
# Remove a role: | ||
# To list installed roles: | ||
ansible-galaxy list | ||
|
||
`ansible-galaxy remove {{username}}.{{role_name}}` | ||
# To search for a given role: | ||
ansible-galaxy search <role> | ||
|
||
# List installed roles: | ||
# To create a new role: | ||
ansible-galaxy init <role> | ||
|
||
`ansible-galaxy list` | ||
|
||
# Search for a given role: | ||
|
||
`ansible-galaxy search {{role_name}}` | ||
|
||
# Create a new role: | ||
|
||
`ansible-galaxy init {{role_name}}` | ||
|
||
# Get the information for the role # or a collection if you replace `role` with `collection`: | ||
|
||
`ansible-galaxy role info {{username}}.{{role_name}}` | ||
# To get the information for the role # or a collection if you replace `role` with `collection`: | ||
ansible-galaxy role info <user>.<role> |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
tags: [ orchestrating ] | ||
tags: [ orchestration ] | ||
--- | ||
# Encrypt string using keyfile `backup_encryption_key` | ||
|
||
ansible-vault encrypt_string 'SupersecretPa$$phrase' --name 'backup_encryption_key' | ||
# To enncrypt string using keyfile `backup_encryption_key`: | ||
ansible-vault encrypt_string 'SupersecretPa$$phrase' --name 'backup_encryption_key' |