Tag up the mailman role.

This commit is contained in:
Ralph Bean 2015-06-29 19:02:54 +00:00
parent 908ebc694c
commit 669210596c

View file

@ -8,30 +8,57 @@
# #
- name: install semanage - name: install semanage
yum: pkg=policycoreutils-python state=present yum: pkg=policycoreutils-python state=present
tags:
- mailman
- selinux
- name: set the SELinux policy for the configuration directory - name: set the SELinux policy for the configuration directory
command: semanage fcontext -a -t etc_t "{{ mailman_webui_confdir }}(/.*)?" command: semanage fcontext -a -t etc_t "{{ mailman_webui_confdir }}(/.*)?"
tags:
- mailman
- selinux
- name: set the SELinux policy for the fulltext index - name: set the SELinux policy for the fulltext index
command: semanage fcontext -a -t httpd_sys_rw_content_t "{{ mailman_webui_basedir }}/fulltext_index(/.*)?" command: semanage fcontext -a -t httpd_sys_rw_content_t "{{ mailman_webui_basedir }}/fulltext_index(/.*)?"
tags:
- mailman
- selinux
- name: set the SELinux policy for the static files directory - name: set the SELinux policy for the static files directory
command: semanage fcontext -a -t httpd_sys_content_t "{{ mailman_webui_basedir }}/static(/.*)?" command: semanage fcontext -a -t httpd_sys_content_t "{{ mailman_webui_basedir }}/static(/.*)?"
tags:
- mailman
- selinux
- name: set the SELinux policy for the log directory - name: set the SELinux policy for the log directory
command: semanage fcontext -a -t httpd_log_t "/var/log/hyperkitty(/.*)?" command: semanage fcontext -a -t httpd_log_t "/var/log/hyperkitty(/.*)?"
tags:
- mailman
- selinux
- name: set the SELinux policy for the generated postfix databases - name: set the SELinux policy for the generated postfix databases
command: semanage fcontext -a -t etc_aliases_t "{{ mailman_webui_basedir }}/var/data/postfix_.*" command: semanage fcontext -a -t etc_aliases_t "{{ mailman_webui_basedir }}/var/data/postfix_.*"
tags:
- mailman
- selinux
- name: allow Apache to remotely connect to PostgreSQL - name: allow Apache to remotely connect to PostgreSQL
seboolean: name=httpd_can_network_connect_db state=yes persistent=yes seboolean: name=httpd_can_network_connect_db state=yes persistent=yes
tags:
- mailman
- selinux
- name: allow Apache to remotely connect to Mailman - name: allow Apache to remotely connect to Mailman
seboolean: name=httpd_can_network_connect state=yes persistent=yes seboolean: name=httpd_can_network_connect state=yes persistent=yes
tags:
- mailman
- selinux
- name: allow Apache to remotely connect to Memcached - name: allow Apache to remotely connect to Memcached
seboolean: name=httpd_can_network_memcache state=yes persistent=yes seboolean: name=httpd_can_network_memcache state=yes persistent=yes
tags:
- mailman
- selinux
# #
@ -40,12 +67,15 @@
- name: setup the hyperkitty repo - name: setup the hyperkitty repo
copy: src=hyperkitty.{{ansible_distribution}}.repo copy: src=hyperkitty.{{ansible_distribution}}.repo
dest=/etc/yum.repos.d/hyperkitty.repo dest=/etc/yum.repos.d/hyperkitty.repo
tags: mailman
- name: install GPG to validate the key - name: install GPG to validate the key
yum: state=present name=gnupg yum: state=present name=gnupg
tags: mailman
- name: add the GPG key - name: add the GPG key
rpm_key: state=present key=https://repos.fedorapeople.org/repos/abompard/abompard.asc rpm_key: state=present key=https://repos.fedorapeople.org/repos/abompard/abompard.asc
tags: mailman
- name: install needed packages - name: install needed packages
yum: pkg={{ item }} state=present yum: pkg={{ item }} state=present
@ -73,20 +103,24 @@
- lynx - lynx
tags: tags:
- packages - packages
- mailman
- name: setup the mailman3-fedmsg repo - name: setup the mailman3-fedmsg repo
copy: src=mailman3-fedmsg-plugin.RedHat.repo copy: src=mailman3-fedmsg-plugin.RedHat.repo
dest=/etc/yum.repos.d/mailman3-fedmsg-plugin.repo dest=/etc/yum.repos.d/mailman3-fedmsg-plugin.repo
when: ansible_distribution == 'RedHat' when: ansible_distribution == 'RedHat'
tags: mailman
- name: add the GPG key for the mailman3-fedmsg-plugin repo - name: add the GPG key for the mailman3-fedmsg-plugin repo
rpm_key: state=present key=https://copr-be.cloud.fedoraproject.org/results/ralph/fedmsg-python34/pubkey.gpg rpm_key: state=present key=https://copr-be.cloud.fedoraproject.org/results/ralph/fedmsg-python34/pubkey.gpg
when: ansible_distribution == 'RedHat' when: ansible_distribution == 'RedHat'
tags: mailman
- name: install the mailman3 fedmsg plugin rpm - name: install the mailman3 fedmsg plugin rpm
yum: pkg=mailman3-fedmsg-plugin state=latest yum: pkg=mailman3-fedmsg-plugin state=latest
notify: restart mailman3 notify: restart mailman3
when: ansible_distribution == 'RedHat' when: ansible_distribution == 'RedHat'
tags: mailman
- name: install packages when not using source extracts - name: install packages when not using source extracts
when: ansible_hostname != "lists-dev.cloud.fedoraproject.org" when: ansible_hostname != "lists-dev.cloud.fedoraproject.org"
@ -97,6 +131,7 @@
- mailman3-hyperkitty - mailman3-hyperkitty
tags: tags:
- packages - packages
- mailman
# #
@ -106,6 +141,7 @@
# user: name=mailman groups=apache append=yes # user: name=mailman groups=apache append=yes
# tags: # tags:
# - config # - config
# - mailman
# #notify: # #notify:
# # - restart mailman3 # # - restart mailman3
@ -114,6 +150,7 @@
user: name=postfix groups=mailman append=yes user: name=postfix groups=mailman append=yes
tags: tags:
- config - config
- mailman
notify: notify:
- restart postfix - restart postfix
@ -122,6 +159,7 @@
# user: name=apache groups=mailman append=yes # user: name=apache groups=mailman append=yes
# tags: # tags:
# - config # - config
# - mailman
# notify: # notify:
# - restart httpd # - restart httpd
@ -133,6 +171,7 @@
- mailman.cfg.j2 - mailman.cfg.j2
tags: tags:
- config - config
- mailman
notify: notify:
- restart mailman3 - restart mailman3
@ -144,6 +183,7 @@
template: src=crontab.j2 dest=/etc/cron.d/hyperkitty template: src=crontab.j2 dest=/etc/cron.d/hyperkitty
tags: tags:
- config - config
- mailman
# #
# Logging # Logging
@ -151,15 +191,19 @@
- name: hyperkitty logging -- directory - name: hyperkitty logging -- directory
file: path=/var/log/hyperkitty state=directory file: path=/var/log/hyperkitty state=directory
owner=root group=apache mode=2775 owner=root group=apache mode=2775
tags: mailman
- name: hyperkitty logging -- file creation - name: hyperkitty logging -- file creation
copy: content="" dest=/var/log/hyperkitty/hyperkitty.log copy: content="" dest=/var/log/hyperkitty/hyperkitty.log
force=no force=no
tags: mailman
- name: hyperkitty logging -- file permissions - name: hyperkitty logging -- file permissions
file: path=/var/log/hyperkitty/hyperkitty.log state=file file: path=/var/log/hyperkitty/hyperkitty.log state=file
owner=root group=apache mode=664 owner=root group=apache mode=664
tags: mailman
- name: hyperkitty logging -- rotation - name: hyperkitty logging -- rotation
copy: src=hyperkitty.logrotate.conf copy: src=hyperkitty.logrotate.conf
dest=/etc/logrotate.d/hyperkitty dest=/etc/logrotate.d/hyperkitty
tags: mailman
# #
@ -168,6 +212,7 @@
- name: create the configuration directory - name: create the configuration directory
file: path={{ mailman_webui_confdir }} state=directory file: path={{ mailman_webui_confdir }} state=directory
tags: mailman
- name: install the hyperkitty settings file - name: install the hyperkitty settings file
template: src=settings.py.j2 template: src=settings.py.j2
@ -175,6 +220,7 @@
owner=root group=apache mode=0640 owner=root group=apache mode=0640
tags: tags:
- config - config
- mailman
notify: notify:
- reload apache - reload apache
#- restart mailman3 #- restart mailman3
@ -185,6 +231,7 @@
owner=root group=root mode=0600 owner=root group=root mode=0600
tags: tags:
- config - config
- mailman
- name: install the hyperkitty settings test file - name: install the hyperkitty settings test file
copy: src=settings_test.py copy: src=settings_test.py
@ -192,6 +239,7 @@
owner=root group=root mode=0600 owner=root group=root mode=0600
tags: tags:
- config - config
- mailman
- name: install the hyperkitty urls file - name: install the hyperkitty urls file
copy: src=urls.py copy: src=urls.py
@ -199,6 +247,7 @@
owner=root group=root mode=0644 owner=root group=root mode=0644
tags: tags:
- config - config
- mailman
notify: notify:
- reload apache - reload apache
@ -208,6 +257,7 @@
owner=root group=root mode=0644 owner=root group=root mode=0644
tags: tags:
- config - config
- mailman
notify: notify:
- reload apache - reload apache
@ -219,6 +269,7 @@
- postorius - postorius
tags: tags:
- config - config
- mailman
notify: notify:
- reload apache - reload apache
@ -227,16 +278,19 @@
dest=/etc/httpd/conf.d/mailman-webui.conf dest=/etc/httpd/conf.d/mailman-webui.conf
tags: tags:
- config - config
- mailman
notify: notify:
- reload apache - reload apache
- name: create the fulltext index dir - name: create the fulltext index dir
file: path="{{ mailman_webui_basedir }}/fulltext_index" file: path="{{ mailman_webui_basedir }}/fulltext_index"
state=directory owner=apache group=apache mode=0755 state=directory owner=apache group=apache mode=0755
tags: mailman
- name: create the hyperkitty static files dir - name: create the hyperkitty static files dir
file: path="{{ mailman_webui_basedir }}/static" file: path="{{ mailman_webui_basedir }}/static"
state=directory owner=root group=root mode=0755 state=directory owner=root group=root mode=0755
tags: mailman
# #
# Plug HyperKitty into Mailman # Plug HyperKitty into Mailman
@ -247,6 +301,7 @@
owner=root group=mailman mode=0640 owner=root group=mailman mode=0640
tags: tags:
- config - config
- mailman
notify: notify:
- restart mailman3 - restart mailman3
@ -255,6 +310,7 @@
dest=/etc/mailman3.d/hyperkitty.cfg state=link dest=/etc/mailman3.d/hyperkitty.cfg state=link
tags: tags:
- config - config
- mailman
notify: notify:
- restart mailman3 - restart mailman3
@ -266,19 +322,23 @@
template: src=mailman-migration.conf.j2 template: src=mailman-migration.conf.j2
dest=/etc/mailman-migration.conf dest=/etc/mailman-migration.conf
owner=root group=root mode=0644 owner=root group=root mode=0644
tags: mailman
- name: create the scripts dir - name: create the scripts dir
file: path="{{ mailman_webui_basedir }}/bin" file: path="{{ mailman_webui_basedir }}/bin"
state=directory owner=root group=root mode=0755 state=directory owner=root group=root mode=0755
tags: mailman
- name: install the migration environment - name: install the migration environment
template: src=mailman-migration-path.sh.j2 template: src=mailman-migration-path.sh.j2
dest=/etc/profile.d/mailman-migration-path.sh dest=/etc/profile.d/mailman-migration-path.sh
owner=root group=root mode=0644 owner=root group=root mode=0644
tags: mailman
- name: install the scripts - name: install the scripts
copy: src={{ item }} dest="{{ mailman_webui_basedir }}/bin/{{ item }}" copy: src={{ item }} dest="{{ mailman_webui_basedir }}/bin/{{ item }}"
owner=root group=root mode=0755 owner=root group=root mode=0755
tags: mailman
with_items: with_items:
- yamlget - yamlget
- pg-give-rights.py - pg-give-rights.py
@ -289,12 +349,14 @@
copy: src=postorius.initial-user.json copy: src=postorius.initial-user.json
dest=/etc/postorius/sites/default/initial-user.json dest=/etc/postorius/sites/default/initial-user.json
owner=root group=apache mode=0640 owner=root group=apache mode=0640
tags: mailman
# Sync databases and collect static files on RPM install/upgrade # Sync databases and collect static files on RPM install/upgrade
- name: install the post-transaction trigger - name: install the post-transaction trigger
template: src=post-transaction.action.j2 template: src=post-transaction.action.j2
dest=/etc/yum/post-actions/hyperkitty.action dest=/etc/yum/post-actions/hyperkitty.action
tags: mailman
# #
# Only run this on mailman01 for now. # Only run this on mailman01 for now.
@ -305,10 +367,12 @@
# store the timestamps there) # store the timestamps there)
- name: start services - name: start services
service: state=started enabled=yes name=memcached service: state=started enabled=yes name=memcached
tags: mailman
- name: run the post-update script - name: run the post-update script
command: "{{ mailman_webui_basedir }}/bin/post-update.sh" command: "{{ mailman_webui_basedir }}/bin/post-update.sh"
when: inventory_hostname.startswith('mailman01') when: inventory_hostname.startswith('mailman01')
tags: mailman
## Postfix ## Postfix
@ -320,6 +384,7 @@
# Memcached # Memcached
- name: set the memcached sysconfig file - name: set the memcached sysconfig file
copy: src=memcached.sysconfig dest=/etc/sysconfig/memcached copy: src=memcached.sysconfig dest=/etc/sysconfig/memcached
tags: mailman
notify: notify:
- restart memcached - restart memcached
@ -332,3 +397,4 @@
- mailman3 - mailman3
- postfix - postfix
- memcached - memcached
tags: mailman