added initial autoconfig state
This commit is contained in:
parent
99d441b27c
commit
55b82fa72c
22
states/autoconfig/config-v1.1.xml.j2
Normal file
22
states/autoconfig/config-v1.1.xml.j2
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<clientConfig version="1.1">
|
||||||
|
<emailProvider id="paulbsd.com">
|
||||||
|
<domain>paulbsd.com</domain>
|
||||||
|
<displayName>Services paulbsd.com</displayName>
|
||||||
|
<displayShortName>paulbsd.com</displayShortName>
|
||||||
|
<incomingServer type="imap">
|
||||||
|
<hostname>imap.paulbsd.com</hostname>
|
||||||
|
<port>993</port>
|
||||||
|
<socketType>SSL</socketType>
|
||||||
|
<authentication>password-cleartext</authentication>
|
||||||
|
<username>%EMAILADDRESS%</username>
|
||||||
|
</incomingServer>
|
||||||
|
<outgoingServer type="smtp">
|
||||||
|
<hostname>smtp.paulbsd.com</hostname>
|
||||||
|
<port>465</port>
|
||||||
|
<socketType>SSL</socketType>
|
||||||
|
<authentication>password-cleartext</authentication>
|
||||||
|
<username>%EMAILADDRESS%</username>
|
||||||
|
</outgoingServer>
|
||||||
|
</emailProvider>
|
||||||
|
</clientConfig>
|
4
states/autoconfig/defaults.yaml
Normal file
4
states/autoconfig/defaults.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
autoconfig:
|
||||||
|
enabled: true
|
||||||
|
install_dir: /usr/local/apps
|
3
states/autoconfig/init.sls
Normal file
3
states/autoconfig/init.sls
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
include:
|
||||||
|
- .install
|
24
states/autoconfig/install.sls
Normal file
24
states/autoconfig/install.sls
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
{%- from "autoconfig/map.jinja" import autoconfig with context %}
|
||||||
|
autoconfig-directory:
|
||||||
|
file.directory:
|
||||||
|
- name: {{ autoconfig.install_dir }}/autoconfig
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 0755
|
||||||
|
|
||||||
|
autoconfig-maildir:
|
||||||
|
file.directory:
|
||||||
|
- name: {{ autoconfig.install_dir }}/autoconfig/mail
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 0755
|
||||||
|
|
||||||
|
autoconfig-file:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ autoconfig.install_dir }}/autoconfig/mail/config-v1.1.xml
|
||||||
|
- source: salt://autoconfig/config-v1.1.xml.j2
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 0644
|
||||||
|
- template: jinja
|
5
states/autoconfig/map.jinja
Normal file
5
states/autoconfig/map.jinja
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{%- import_yaml "autoconfig/defaults.yaml" as default_settings -%}
|
||||||
|
|
||||||
|
{%- set defaults = salt['grains.filter_by'](default_settings, default='autoconfig')-%}
|
||||||
|
|
||||||
|
{%- set autoconfig = salt['pillar.get']('autoconfig', default=defaults, merge=True) -%}
|
Loading…
Reference in New Issue
Block a user