Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
9dd903ab
Commit
9dd903ab
authored
Aug 18, 2016
by
Jesse Shapiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving to new-style formatting for role; moving to explicit Postfix restart task
parent
7acc49f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
35 deletions
+27
-35
playbooks/roles/postfix_queue/handlers/main.yml
+0
-9
playbooks/roles/postfix_queue/tasks/main.yml
+27
-26
No files found.
playbooks/roles/postfix_queue/handlers/main.yml
deleted
100644 → 0
View file @
7acc49f6
---
# postfix_queue: Configure a local postfix server to forward mail to an
# external SMTP server. This way postfix acts as an outgoing mail queue, and
# web apps can send mail instantly, while still taking advantage of an
# external SMTP service.
-
name
:
restart postfix
service
:
name=postfix state=restarted
playbooks/roles/postfix_queue/tasks/main.yml
View file @
9dd903ab
...
@@ -25,50 +25,51 @@
...
@@ -25,50 +25,51 @@
-
"
smtp_tls_mandatory_ciphers
=
{{
postfix_queue_smtp_tls_mandatory_ciphers
}}"
-
"
smtp_tls_mandatory_ciphers
=
{{
postfix_queue_smtp_tls_mandatory_ciphers
}}"
-
"
sender_canonical_maps
=
hash:{{
postfix_queue_sender_canonical_maps_file
}}"
-
"
sender_canonical_maps
=
hash:{{
postfix_queue_sender_canonical_maps_file
}}"
-
"
header_checks
=
regexp:{{
postfix_queue_header_checks_file
}}"
-
"
header_checks
=
regexp:{{
postfix_queue_header_checks_file
}}"
notify
:
restart postfix
-
name
:
Explain postfix authentication
-
name
:
Explain postfix authentication
lineinfile
:
>
lineinfile
:
dest
=
"{{ postfix_queue_password_file }}"
dest
:
"
{{
postfix_queue_password_file
}}"
line
=
"# Configured by Ansible:"
line
:
"
#
Configured
by
Ansible:"
create
=
yes
create
:
yes
-
name
:
Set permissions of password file
-
name
:
Set permissions of password file
file
:
path="{{ postfix_queue_password_file }}" state=file mode="0600" owner=root group=root
file
:
path="{{ postfix_queue_password_file }}" state=file mode="0600" owner=root group=root
-
name
:
Configure postfix authentication
-
name
:
Configure postfix authentication
lineinfile
:
>
lineinfile
:
dest
=
"{{ postfix_queue_password_file }}"
dest
:
"
{{
postfix_queue_password_file
}}"
line
=
"{{ postfix_queue_relayhost }} {{ POSTFIX_QUEUE_EXTERNAL_SMTP_USER }}:{{ POSTFIX_QUEUE_EXTERNAL_SMTP_PASSWORD }}"
line
:
"
{{
postfix_queue_relayhost
}}
{{
POSTFIX_QUEUE_EXTERNAL_SMTP_USER
}}:{{
POSTFIX_QUEUE_EXTERNAL_SMTP_PASSWORD
}}"
insertafter
=
"# Configured by Ansible:"
insertafter
:
"
#
Configured
by
Ansible:"
register
:
postfix_queue_password
register
:
postfix_queue_password
-
name
:
Hash postfix SASL password
-
name
:
Hash postfix SASL password
command
:
"
postmap
hash:{{
postfix_queue_password_file
}}"
command
:
"
postmap
hash:{{
postfix_queue_password_file
}}"
when
:
postfix_queue_password.changed
when
:
postfix_queue_password.changed
notify
:
restart postfix
-
name
:
Configure postfix sender canonical maps
-
name
:
Configure postfix sender canonical maps
copy
:
>
copy
:
dest
=
"{{ postfix_queue_sender_canonical_maps_file }}"
dest
:
"
{{
postfix_queue_sender_canonical_maps_file
}}"
content
=
"# Configured by Ansible:\n{{ POSTFIX_QUEUE_SENDER_CANONICAL_MAPS }}"
content
:
"
#
Configured
by
Ansible:
\n
{{
POSTFIX_QUEUE_SENDER_CANONICAL_MAPS
}}"
force
=
true
force
:
true
owner
=
root
owner
:
root
group
=
root
group
:
root
mode
=
"0600"
mode
:
"
0600"
register
:
postfix_queue_sender_canonical_maps
register
:
postfix_queue_sender_canonical_maps
-
name
:
Hash postfix sender canonical maps file
-
name
:
Hash postfix sender canonical maps file
command
:
"
postmap
hash:{{
postfix_queue_sender_canonical_maps_file
}}"
command
:
"
postmap
hash:{{
postfix_queue_sender_canonical_maps_file
}}"
when
:
postfix_queue_sender_canonical_maps.changed
when
:
postfix_queue_sender_canonical_maps.changed
notify
:
restart postfix
-
name
:
Configure postfix header checks
-
name
:
Configure postfix header checks
copy
:
>
copy
:
dest="{{ postfix_queue_header_checks_file }}"
dest
:
"
{{
postfix_queue_header_checks_file
}}"
content="# Configured by Ansible:\n{{ POSTFIX_QUEUE_HEADER_CHECKS }}"
content
:
"
#
Configured
by
Ansible:
\n
{{
POSTFIX_QUEUE_HEADER_CHECKS
}}"
force=true
force
:
true
owner=root
owner
:
root
group=root
group
:
root
mode="0600"
mode
:
"
0600"
notify
:
restart postfix
-
name
:
Restart Postfix
service
:
name
:
postfix
state
:
restarted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment