Skip to content

Commit

Permalink
fix: formatting on ansible*
Browse files Browse the repository at this point in the history
Make formatting changes to `ansible`, `ansible-galaxy`, and
`ansible-vault` for the sake of consistency with other cheatsheets.
  • Loading branch information
chrisallenlane committed Jul 7, 2021
1 parent 68abb45 commit 509205d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
5 changes: 2 additions & 3 deletions ansible
@@ -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"
32 changes: 13 additions & 19 deletions ansible-galaxy
@@ -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>
7 changes: 3 additions & 4 deletions ansible-vault
@@ -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'

0 comments on commit 509205d

Please sign in to comment.