Merge branch 'install_from_debian_backports_enable_pop3' into 'master'

[trees] - install dovecot from debian backports, enable pop3

Closes #24

See merge request riseuplabs/trees!11
This commit is contained in:
micah 2018-08-10 08:41:18 -07:00
commit 14fed7d1ff
13 changed files with 164 additions and 2 deletions

View File

@ -32,6 +32,7 @@
# - install libsodium from normal debian repos (current version 1.0.12)
# - uses ARGON2
roles:
- jnv.debian-backports
- init
- mariadb
- postfix

View File

@ -27,6 +27,7 @@
apt:
pkg: "{{ item }}"
state: present
default_release: "{{ ansible_distribution_release }}-backports"
with_items:
- dovecot-core
- dovecot-common

View File

@ -3,6 +3,7 @@
apt:
pkg: "{{ item }}"
state: present
default_release: "{{ ansible_distribution_release }}-backports"
with_items:
- build-essential
- dovecot-core

View File

@ -28,8 +28,8 @@
# <doc/wiki/MailLocation.txt>
#
#mail_location = mdbox:/var/vmail/%Ld/%Ln/Maildir
mail_location = {{ dovecot_mailbox_type }}:/var/vmail/%Ld/%Ln/Maildir
mail_home = /var/vmail/%Ld/%Ln
mail_location = {{ dovecot_mailbox_type }}:~/Maildir
# If you need to set multiple mailbox locations or want to change default
# namespace settings, you can do it by defining namespace sections.

View File

@ -0,0 +1,40 @@
# [Debian/Ubuntu Backports with Ansible](https://github.com/jnv/ansible-role-debian-backports)
Adds backports repository for Debian and Ubuntu.
## Usage
Install via [Galaxy](https://galaxy.ansibleworks.com/):
```
ansible-galaxy install jnv.debian-backports
```
In your playbook:
```yaml
- hosts: all
roles:
# ...
- jnv.debian-backports
```
The role uses [apt_repository module](http://docs.ansible.com/apt_repository_module.html) which has additional dependencies. I highly recommend to use [bootstrap-debian](https://github.com/cederberg/ansible-bootstrap-debian) role to setup common Ansible requirements on Debian-based systems.
You can use `default_release` option for [apt module](http://docs.ansible.com/apt_module.html) to install package from backports. For example:
```yaml
tasks:
- apt: name=mosh state=present default_release={{ansible_distribution_release}}-backports
```
`ansible_distribution_release` variable contains release name, i.e. `precise` or `wheezy`.
## Variables
- `backports_uri`: URI of the backports repository; change this if you want to use a particular mirror.
+ Debian: `http://ftp.debian.org/debian`
+ Ubuntu: `http://archive.ubuntu.com/ubuntu`
- `backports_components`: Release and components for sources.list
+ Debian: `{{backports_distribution}}-backports backports main contrib non-free`
+ Ubuntu: `{{backports_distribution}}-backports main restricted universe multiverse`

View File

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org>

View File

@ -0,0 +1 @@
{install_date: 'Fri Aug 10 08:05:23 2018', version: v0.2.0}

View File

@ -0,0 +1,79 @@
---
galaxy_info:
author: Jan Vlnas
description: Add backports repository for Debian and Ubuntu
license: Unlicense
min_ansible_version: 1.2
#
# Below are all platforms currently available. Just uncomment
# the ones that apply to your role. If you don't see your
# platform on this list, let us know and we'll get it added!
#
platforms:
#- name: EL
# versions:
# - all
# - 5
# - 6
#- name: GenericUNIX
# versions:
# - all
# - any
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
#- name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
#- name: GenericBSD
# versions:
# - all
# - any
#- name: FreeBSD
# versions:
# - all
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
- name: Ubuntu
versions:
- all
- name: Debian
versions:
- all
categories:
#- cloud
#- cloud:ec2
#- cloud:gce
#- cloud:rax
#- database
#- database:nosql
#- database:sql
#- development
#- monitoring
#- networking
- packaging
- system
#- web
dependencies: []
# List your role dependencies here, one per line. Only
# dependencies available via galaxy should be listed here.
# Be sure to remove the '[]' above if you add dependencies
# to this list.

View File

@ -0,0 +1,6 @@
---
- name: add distribution-specific variables
include_vars: "{{ ansible_distribution }}.yml"
- name: add backports repository
apt_repository: repo='deb {{backports_uri}} {{backports_components}}' state=present update_cache=yes

View File

@ -0,0 +1,3 @@
---
backports_uri: http://http.debian.net/debian
backports_components: "{{backports_distribution}}-backports main contrib non-free"

View File

@ -0,0 +1,3 @@
---
backports_uri: http://archive.ubuntu.com/ubuntu
backports_components: "{{backports_distribution}}-backports main restricted universe multiverse"

View File

@ -0,0 +1,2 @@
---
backports_distribution: "{{ansible_distribution_release}}"

View File

@ -4,6 +4,7 @@
apt:
pkg: "{{ item }}"
state: present
default_release: "{{ ansible_distribution_release }}-backports"
with_items:
- build-essential
- dovecot-core