Remove old cloud lists-dev in favor of the new one.
This commit is contained in:
parent
0546744c85
commit
044a5f7d32
4 changed files with 0 additions and 187 deletions
|
@ -1,15 +0,0 @@
|
||||||
---
|
|
||||||
instance_type: m1.large
|
|
||||||
image: "{{ f20_qcow_id }}"
|
|
||||||
keypair: fedora-admin-20130801
|
|
||||||
security_group: smtpserver
|
|
||||||
zone: nova
|
|
||||||
hostbase: lists-dev-
|
|
||||||
public_ip: 209.132.184.145
|
|
||||||
root_auth_users: abompard
|
|
||||||
description: lists-dev instance to further test hyperkitty and mailman3
|
|
||||||
volumes: ['-d /dev/vdb vol-0000000c']
|
|
||||||
freezes: false
|
|
||||||
|
|
||||||
# Used by the mailman role
|
|
||||||
mailman_url: lists-dev.cloud.fedoraproject.org
|
|
|
@ -274,9 +274,6 @@ fas03.phx2.fedoraproject.org
|
||||||
[fas-stg]
|
[fas-stg]
|
||||||
fas01.stg.phx2.fedoraproject.org
|
fas01.stg.phx2.fedoraproject.org
|
||||||
|
|
||||||
[hyperkitty-stg]
|
|
||||||
lists-dev.cloud.fedoraproject.org
|
|
||||||
|
|
||||||
[hosted]
|
[hosted]
|
||||||
hosted03.fedoraproject.org
|
hosted03.fedoraproject.org
|
||||||
hosted-lists01.fedoraproject.org
|
hosted-lists01.fedoraproject.org
|
||||||
|
|
|
@ -116,8 +116,6 @@
|
||||||
- include: /srv/web/infra/ansible/playbooks/hosts/dopr-dev.cloud.fedoraproject.org.yml
|
- include: /srv/web/infra/ansible/playbooks/hosts/dopr-dev.cloud.fedoraproject.org.yml
|
||||||
#- include: /srv/web/infra/ansible/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml
|
#- include: /srv/web/infra/ansible/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/hosts/junk01.phx2.fedoraproject.org.yml
|
- include: /srv/web/infra/ansible/playbooks/hosts/junk01.phx2.fedoraproject.org.yml
|
||||||
# Waiting for rhel7 python3 and reinstall
|
|
||||||
#- include: /srv/web/infra/ansible/playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml
|
|
||||||
- include: /srv/web/infra/ansible/playbooks/hosts/lists-dev.fedorainfracloud.org.yml
|
- include: /srv/web/infra/ansible/playbooks/hosts/lists-dev.fedorainfracloud.org.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/hosts/shogun-ca.cloud.fedoraproject.org.yml
|
- include: /srv/web/infra/ansible/playbooks/hosts/shogun-ca.cloud.fedoraproject.org.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/hosts/taiga.cloud.fedoraproject.org.yml
|
- include: /srv/web/infra/ansible/playbooks/hosts/taiga.cloud.fedoraproject.org.yml
|
||||||
|
|
|
@ -1,167 +0,0 @@
|
||||||
- name: check/create instance
|
|
||||||
hosts: lists-dev.cloud.fedoraproject.org
|
|
||||||
user: root
|
|
||||||
gather_facts: False
|
|
||||||
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- include: "{{ tasks }}/persistent_cloud.yml"
|
|
||||||
|
|
||||||
- name: provisions basics onto system/setup paths
|
|
||||||
hosts: lists-dev.cloud.fedoraproject.org
|
|
||||||
user: root
|
|
||||||
gather_facts: True
|
|
||||||
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
||||||
vars:
|
|
||||||
- mailman_vardir: /srv/persist/mailman
|
|
||||||
- tcp_ports: [22, 25, 80, 443]
|
|
||||||
- udp_ports: []
|
|
||||||
- postfix_maincf: "{{ roles }}/base/files/postfix/main.cf/main.cf.lists-dev.cloud.fedoraproject.org"
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- sudo
|
|
||||||
- hosts
|
|
||||||
- apache
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- include: "{{ tasks }}/cloud_setup_basic.yml"
|
|
||||||
- include: "{{ tasks }}/postfix_basic.yml"
|
|
||||||
- include: "{{ tasks }}/yumrepos.yml"
|
|
||||||
- include: "{{ tasks }}/motd.yml"
|
|
||||||
- include: "{{ tasks }}/mod_wsgi.yml"
|
|
||||||
|
|
||||||
- name: mount up disk of persistent storage
|
|
||||||
action: mount name=/srv/persist src='LABEL=lists-dev' fstype=ext4 state=mounted
|
|
||||||
|
|
||||||
- name: selinux status
|
|
||||||
selinux: policy=targeted state=enforcing
|
|
||||||
|
|
||||||
# /srv/persist
|
|
||||||
- name: mount up bind mount for postgres
|
|
||||||
action: mount src=/srv/persist/pgsqldb name=/var/lib/pgsql fstype=auto opts=bind state=mounted
|
|
||||||
- name: mount up bind mount for mailman
|
|
||||||
action: mount src=/srv/persist/mailman name=/var/lib/mailman3 fstype=auto opts=bind state=mounted
|
|
||||||
|
|
||||||
- name: get the repo file
|
|
||||||
get_url: url=https://repos.fedorapeople.org/repos/abompard/hyperkitty/hyperkitty.repo
|
|
||||||
dest=/etc/yum.repos.d/hyperkitty.repo mode=0444
|
|
||||||
|
|
||||||
# Database
|
|
||||||
- name: install postgresql server packages
|
|
||||||
yum: name={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- postgresql-server
|
|
||||||
- postgresql-contrib
|
|
||||||
- python-psycopg2
|
|
||||||
|
|
||||||
- name: initialize postgresql
|
|
||||||
command: /usr/bin/postgresql-setup initdb
|
|
||||||
creates=/var/lib/pgsql/data/postgresql.conf
|
|
||||||
|
|
||||||
- name: copy pg_hba.conf
|
|
||||||
copy: src="{{ files }}/lists-dev/pg_hba.conf" dest=/var/lib/pgsql/data/pg_hba.conf
|
|
||||||
owner=postgres group=postgres
|
|
||||||
notify:
|
|
||||||
- restart postgresql
|
|
||||||
|
|
||||||
- name: start postgresql
|
|
||||||
service: state=started enabled=yes name=postgresql
|
|
||||||
|
|
||||||
- name: allow running sudo commands as postgresql for ansible
|
|
||||||
copy: src="{{ files }}/lists-dev/sudoers-norequiretty-postgres" dest=/etc/sudoers.d/norequiretty-postgres
|
|
||||||
owner=root group=root mode=0440
|
|
||||||
|
|
||||||
handlers:
|
|
||||||
- include: "{{ handlers }}/restart_services.yml"
|
|
||||||
- name: restart postgresql
|
|
||||||
service: name=postgresql state=restarted
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: setup db users/passwords for hyperkitty
|
|
||||||
hosts: hyperkitty-stg
|
|
||||||
gather_facts: no
|
|
||||||
sudo: yes
|
|
||||||
sudo_user: postgres
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
|
||||||
vars:
|
|
||||||
- mailman_vardir: /srv/persist/mailman
|
|
||||||
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
# mailman auto-updates its schema, there can only be one admin user
|
|
||||||
- name: mailman DB user
|
|
||||||
postgresql_user: name=mailmanadmin password={{ lists_dev_mm_db_pass }}
|
|
||||||
- name: hyperkitty DB admin user
|
|
||||||
postgresql_user: name=hyperkittyadmin password={{ lists_dev_hk_db_pass }}
|
|
||||||
- name: hyperkitty DB user
|
|
||||||
postgresql_user: name=hyperkittyapp password={{ lists_dev_hk_db_pass }}
|
|
||||||
- name: databases creation
|
|
||||||
postgresql_db: name={{ item }} owner="{{ item }}admin" encoding=UTF-8
|
|
||||||
with_items:
|
|
||||||
- mailman
|
|
||||||
- hyperkitty
|
|
||||||
|
|
||||||
- name: setup mailman and hyperkitty
|
|
||||||
hosts: hyperkitty-stg
|
|
||||||
gather_facts: no
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- role: mailman
|
|
||||||
mailman_db_server: localhost
|
|
||||||
mailman_mailman_db_pass: "{{ lists_dev_mm_db_pass }}"
|
|
||||||
mailman_hyperkitty_admin_db_pass: "{{ lists_dev_hk_db_pass }}"
|
|
||||||
mailman_hyperkitty_db_pass: "{{ lists_dev_hk_db_pass }}"
|
|
||||||
mailman_hyperkitty_cookie_key: "randomstringusedasacookiesecurekey-yesthisshouldbeinaprivaterepo_butidonthaveaccesstoit"
|
|
||||||
mailman_url: "{{ ansible_fqdn }}"
|
|
||||||
- collectd/base
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: install more needed packages
|
|
||||||
yum: pkg={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- tar
|
|
||||||
- vim
|
|
||||||
- tmux
|
|
||||||
- patch
|
|
||||||
tags:
|
|
||||||
- packages
|
|
||||||
|
|
||||||
#- name: easy access to the postgresql databases
|
|
||||||
# template: src="{{ files }}/lists-dev/pgpass.j2" dest=/root/.pgpass
|
|
||||||
# owner=root group=root mode=0600
|
|
||||||
|
|
||||||
- name: send root mail to abompard
|
|
||||||
lineinfile: dest=/etc/aliases regexp='^root:' line="root:abompard@fedoraproject.org"
|
|
||||||
notify:
|
|
||||||
- reload aliases
|
|
||||||
|
|
||||||
# Mailman is installed from source, not from the RPM
|
|
||||||
- name: systemd service file for mailman3
|
|
||||||
template: src="{{ files }}mailman3.service.j2" dest=/etc/systemd/system/multi-user.target.wants/mailman3.service
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
|
|
||||||
- name: mailman logging -- rotation
|
|
||||||
template: src=mailman.logrotate.j2 dest=/etc/logrotate.d/mailman3
|
|
||||||
|
|
||||||
|
|
||||||
handlers:
|
|
||||||
- include: "{{ handlers }}/restart_services.yml"
|
|
||||||
- name: reload aliases
|
|
||||||
command: newaliases
|
|
Loading…
Add table
Add a link
Reference in a new issue