mirror of
https://github.com/lemeow125/Notes.git
synced 2024-11-17 04:09:26 +08:00
vault backup: 2024-10-25 21:35:23
Affected files: docs/Command Snippets/Ansible Snippets.md docs/Command Snippets/Docker - Miscellaneous.md
This commit is contained in:
parent
71ede7ecbf
commit
f359c7ae0e
2 changed files with 9 additions and 9 deletions
|
@ -1,19 +1,19 @@
|
|||
WSL Fix for world-writable directories
|
||||
- WSL Fix for world-writable directories
|
||||
```bash
|
||||
export ANSIBLE_CONFIG=./ansible.cfg
|
||||
```
|
||||
Ping
|
||||
- Ping
|
||||
```bash
|
||||
ansible all -m ping
|
||||
```
|
||||
Gather facts
|
||||
- Gather facts
|
||||
```bash
|
||||
ansible all -m gather_facts
|
||||
|
||||
# Limit to one device
|
||||
ansible all -m gather_facts --limit ADDRESS
|
||||
```
|
||||
Elevate command to root user
|
||||
- Elevate command to root user
|
||||
```bash
|
||||
# This will fail without sudo
|
||||
ansible all -m apt -a update_cache=true
|
||||
|
@ -22,15 +22,15 @@ ansible all -m apt -a update_cache=true
|
|||
# Equivalent to sudo apt-update
|
||||
ansible all -m apt -a update_cache=true --become --ask-become-me-pass
|
||||
```
|
||||
Install packages
|
||||
- Install packages
|
||||
```bash
|
||||
ansible all -m apt -a name=vim --become --ask-become-pass
|
||||
```
|
||||
Install/Update Package (multiple arguments)
|
||||
- Install/Update Package (multiple arguments)
|
||||
```bash
|
||||
ansible all -m apt -a "name=vim state=latest" --become --ask-become-pass
|
||||
```
|
||||
`sudo apt update` equivalent
|
||||
- `sudo apt update` equivalent
|
||||
```bash
|
||||
ansible all -m apt -a "name=apt state=latest" --become --ask-become-pass
|
||||
```
|
|
@ -1,4 +1,4 @@
|
|||
Create CIFS/Samba Volume
|
||||
- Create CIFS/Samba Volume
|
||||
```bash
|
||||
docker volume create \
|
||||
--driver local \
|
||||
|
@ -7,4 +7,4 @@ docker volume create \
|
|||
--opt o=username=USERNAME,password=PASSWORD \
|
||||
--name VOLUME_NAME
|
||||
```
|
||||
Native CIFS credentials file is not supported with Docker CIFS volumes
|
||||
*Native CIFS credentials file is not supported with Docker CIFS volumes*
|
Loading…
Reference in a new issue