container-server/tasks/host.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

version: "3"
tasks:
iptables:
desc: Print iptables
cmds:
- iptables -vnL
awall-activate:
desc: Activate awall rules and restart docker daemon
cmds:
- awall translate --verify
- awall activate
- service docker restart
update-task:
desc: Download latest Taskfile binary
cmds:
- sh -c "$(wget https://taskfile.dev/install.sh -O -)" -- -d -b .
install-task:
desc: Install Taskfile system wide
cmds:
- sh -c "$(wget https://taskfile.dev/install.sh -O -)" -- -d -b /usr/bin
install-completion:
desc: Add Taskfile zsh completion
cmds:
- mkdir -p /usr/local/share/zsh/site-functions
- wget -O /usr/local/share/zsh/site-functions/_task https://raw.githubusercontent.com/go-task/task/master/completion/zsh/_task
allow-sudo:
desc: Allow sudo without password for 10s to allow sshfs mounting
cmds:
- "echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/nopasswd"
- echo passwordless sudo is enabled for 10s
- sleep 10
- rm /etc/sudoers.d/nopasswd
- ls /etc/sudoers.d
- echo passwordless sudo is disabled