Maximilian Eschenbacher 6 роки тому
джерело
коміт
f57911516d
1 змінених файлів з 27 додано та 16 видалено
  1. +27
    -16
      README.md

+ 27
- 16
README.md Переглянути файл

@@ -1,27 +1,38 @@
# wireguard-formula

currently with only `_modules` and `_states`.
Installs WireGuard (usually dkms and utils), and creates interfaces plus peers.

# Install
See the full [Salt Formulas installation and usage instructions](http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html).

Add the path to the wireguard-formula to the master configuration file under option
`file_roots` or as `gitfs_remotes`.
# Configuration

# Use as module
All configuration is done via pillar data. See `pillar.example` for examples.

# Available states

## `wg.present (name, listen_port, fwmark, private_key, preshared_key)`

Creates a wireguard interface and sets interface-wide parameters.

## `wg.peer_present (name, interface, endpoint, persistent_keepalive, allowed_ips)`

Adds a peer to an interface and sets peer-specific parameters.

## `wg.absent (name)`

Removes a wireguard interface.

## `wg.peer_absent (name, interface)`

Removes a peer from an interface.

# Excerpt of a few available module functions

`salt-call wg.create wgtest`

`salt-call wg.show wgtest`
`salt-call wg.set interface listen_port=1337`
`salt-call wg.delete wgtest`

# Use as state
`salt-call wg.set interface listen_port=1337`

```
wgtest:
wg.present:
- listen_port: 1337
`salt-call wg.delete wgtest`

1ymBfBty05PNhD/QJKUlu4aL2p4jKSWVVqVQWIQG6wM=:
wg.peer_present:
- interface: wgtest
```

Завантаження…
Відмінити
Зберегти