Added example playbook.
This commit is contained in:
parent
64c4aaf974
commit
3d6d248d57
24
README.md
24
README.md
|
@ -8,8 +8,10 @@ This ansible role deploys msmtp as a mailer for Debian, Ubuntu, Arch & Alpine Li
|
||||||
* Access to a functioning SMTP server.
|
* Access to a functioning SMTP server.
|
||||||
|
|
||||||
## How to install
|
## How to install
|
||||||
* Use github to clone/fork into your role directory
|
* Either use github to clone/dwonload into your roles directory:
|
||||||
* ansible galaxy ```ansible-galaxy install chriswayg.msmtp-mailer```
|
- `git clone https://github.com/chriswayg/ansible-etckeeper.git`
|
||||||
|
* Or use ansible galaxy:
|
||||||
|
- `ansible-galaxy install chriswayg.msmtp-mailer`
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
All the default variables are located **defaults/main.yml**. Mostly you would need to configure the following variables.
|
All the default variables are located **defaults/main.yml**. Mostly you would need to configure the following variables.
|
||||||
|
@ -69,18 +71,26 @@ This ansible role deploys msmtp as a mailer for Debian, Ubuntu, Arch & Alpine Li
|
||||||
## Configure
|
## Configure
|
||||||
You can configure your variables in ansible with one of the following
|
You can configure your variables in ansible with one of the following
|
||||||
|
|
||||||
* Create a variable in host/group variables directory. (recommended)
|
* Create a variable in host/group variables directory.
|
||||||
* Editing var/main.yml
|
* Editing vars/main.yml
|
||||||
* Run ansible-playbook with -e
|
* Run ansible-playbook with -e
|
||||||
* Edit the default/main.yml (not recommended)
|
* Edit the defaults/main.yml (not recommended)
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- chriswayg.msmtp-mailer
|
||||||
|
```
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
**By default mstmp will work as the configuration uses a real smtp server (for testing only!)**
|
**By default mstmp will function out of the box with the defaults/main.yml settings, because the configuration uses a real smtp server (for testing only!)**
|
||||||
|
|
||||||
```ansible-playbook -l hostname msmtp.yml```
|
```ansible-playbook -l hostname msmtp.yml```
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
You should get a test mail if it works on the root mail
|
You should get a test mail if it works as expected on the root mail
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
[msmtp manual](http://msmtp.sourceforge.net/doc/msmtp.html)
|
[msmtp manual](http://msmtp.sourceforge.net/doc/msmtp.html)
|
||||||
|
|
Loading…
Reference in a new issue