Make regcfp its own role

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-01-22 10:50:25 +00:00
parent 1f9a6c167c
commit 735e5b1687
5 changed files with 213 additions and 16 deletions

View file

@ -25,20 +25,7 @@
- name: set hostname (required by some services, at least postfix need it)
shell: "hostname {{inventory_hostname}}"
tasks:
- name: add packages
yum: state=present name={{ item }}
with_items:
- git
- nodejs
- npm
- postgresql
- postgresql-server
- wget
- unzip
roles:
- regcfp
- name: Clone the regcfp flock2016 branch
git: repo=https://github.com/puiterwijk/regcfp.git
dest=/srv/regcfp
version=flock2016
clone=yes update=yes
tasks:

View file

@ -0,0 +1,12 @@
[Service]
ExecStart=/bin/node /srv/regcfp/bin/www
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=regcfp
User=regcfp
Group=regcfp
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,3 @@
---
- name: restart regcfp
service: name=regcfp state=restarted

View file

@ -0,0 +1,34 @@
---
- name: install needed packages
yum: pkg={{ item }} state=present
with_items:
- git
- node
- npm
- postgresql
- posgresql-server
tags:
- packages
# Todo: Create the database
- name: Clone the regcfp flock2016 branch
git: repo=https://github.com/puiterwijk/regcfp.git
dest=/srv/regcfp
version=flock2016
clone=yes update=yes
- name: copy over the server config
template: src=config.json dest=/srv/regcfp/config/config.json mode=0640
notify:
- restart regcfp
- name: copy over the systemd file
template: src=regcfp.service dest=/etc/systemd/system/regcfp.service mode=0640
notify:
- restart regcfp
- name: glusterd service
service: name=glusterd state=started enabled=yes

View file

@ -0,0 +1,161 @@
{
"development": {
"theming": {
"site_name": "FLOCK 2016 Registration",
"event_name": "Flock 2016",
"logo": ""
},
"secret": "{{ regcfp_secret }}",
"database": {
"database": "database.sqlite",
"dialect": "sqlite",
"storage": "database.sqlite",
"define": {
"paranoid": true
}
},
"email": {
"from": "myevent@example.com",
"transport": {
"host": "localhost"
}
},
"listen": {
"http": {
"enabled": true,
"listenip": "0.0.0.0",
"port": 80
},
"https": {
"enabled": false,
"only": true,
"url": "https://register.flocktofedora.org",
"listenip": "0.0.0.0",
"port": 443,
"cert": "certificate.crt",
"key": "certificate.key"
}
},
"persona_audience": "https://register.flocktofedora.org",
"permissions": {
"admin": ["puiterwijk@fedoraproject.org"],
"papers": {
"submit": ["puiterwijk@fedoraproject.org"],
"list": {
"accepted": ["puiterwijk@fedoraproject.org"],
"own": ["puiterwijk@fedoraproject.org"],
"all": ["puiterwijk@fedoraproject.org"]
},
"tag": ["puiterwijk@fedoraproject.org"],
"vote": ["puiterwijk@fedoraproject.org"],
"showvotes": ["puiterwijk@fedoraproject.org"],
"accept": ["puiterwijk@fedoraproject.org"]
},
"registration": {
"register": ["puiterwijk@fedoraproject.org"],
"pay": [],
"request_receipt": [],
"view_public": ["puiterwijk@fedoraproject.org"],
"view_all": ["puiterwijk@fedoraproject.org"],
"add_payment": [],
"print_badge": ["puiterwijk@fedoraproject.org"],
"desk": ["puiterwijk@fedoraproject.org"]
}
},
"papers": {
"enabled": true,
"tracks": [
"security",
"data"
]
},
"registration": {
"enabled": true,
"fields": {
"country": {
"display_name": "Country",
"type": "country",
"required": true,
"private": true,
"placeholder": "Country of origin"
},
"ircnick": {
"display_name": "IRC Nickname",
"type": "string",
"required": true,
"private": true,
"placeholder": "IRC Nickname"
},
"shirtsize": {
"display_name": "T-shirt size",
"type": "select",
"message": "This will be kept private",
"required": false,
"private": true,
"placeholder": "",
"options": [
"XS",
"S",
"M",
"L",
"XL"
]
}
},
"payment_product_name": "My Event Registration Fee",
"currencies": {
"EUR": {
"symbol": "€",
"min_amount_for_receipt": 20,
"default_amount": 40,
"conversion_rate": 1
},
"SEK": {
"symbol": "kr",
"min_amount_for_receipt": 190,
"default_amount": 380,
"conversion_rate": 0.11
}
},
"main_currency": "EUR",
"paypal_experience_profile": "",
"desk_word": "something",
"paypal": {
"api_credentials": {
"mode": "live",
"client_id": "",
"client_secret": ""
},
"profile": {
"name": "Event Registration Profile",
"presentation": {
"brand_name": "Event Foundation",
"logo_image": "https://www.guadec.org/wp-content/uploads/2014/10/guadec-logo-white.png",
"locale_code": "US"
},
"input_fields": {
"allow_note": true,
"no_shipping": 1,
"address_override": 0
},
"flow_config": {
"landing_page_type": "billing",
"bank_txn_pending_url": "http://www.guadec.org"
}
}
}
}
}
}