[ansible] Rename moin to moin01
by Nicolas Chauvet
commit 6865f9eeee8c901f621674d607d309c2c392e493
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Nov 25 16:36:50 2016 +0100
Rename moin to moin01
inventory/inventory | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/inventory/inventory b/inventory/inventory
index 8b51de2..0b342ae 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -38,8 +38,7 @@ db02.online.rpmfusion.net
test01.scaleway.rpmfusion.net
[moin]
-se01.online.rpmfusion.net
-test01.scaleway.rpmfusion.net
+moin01.online.rpmfusion.net
[pkgdb]
pkgdb02.online.rpmfusion.net
8 years
[ansible] Update reverse proxy to point to wiki
by Nicolas Chauvet
commit 073fc169e29c0d965d7a7e033d3eb7358c13de50
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Nov 25 15:58:02 2016 +0100
Update reverse proxy to point to wiki
playbooks/include/proxies-reverseproxy.yml | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/playbooks/include/proxies-reverseproxy.yml b/playbooks/include/proxies-reverseproxy.yml
index 974739a..261d997 100644
--- a/playbooks/include/proxies-reverseproxy.yml
+++ b/playbooks/include/proxies-reverseproxy.yml
@@ -13,10 +13,12 @@
roles:
-# - role: httpd/reverseproxy
-# website: id.rpmfusion.org
-# destname: id
-# proxyurl: http://localhost:10020
+ - role: httpd/reverseproxy
+ website: rpmfusion.org
+ destname: se01
+ localpath: /
+ remotepath: /moin
+ proxyurl: http://se01
- role: httpd/reverseproxy
website: admin.rpmfusion.org
8 years
[ansible] Update proxy for rpmfusion.org
by Nicolas Chauvet
commit 3bb7c8f242f2985270d5b32f796729a065a7ff75
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Nov 25 15:50:12 2016 +0100
Update proxy for rpmfusion.org
playbooks/include/proxies-websites.yml | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml
index f2d53af..c5437f9 100644
--- a/playbooks/include/proxies-websites.yml
+++ b/playbooks/include/proxies-websites.yml
@@ -49,7 +49,8 @@
- role: httpd/website
name: rpmfusion.org
server_aliases:
- - localhost
+ - www.rpmfusion.org
+ sslonly: true
cert_name: "{{wildcard_cert_name}}"
- role: httpd/website
8 years
[ansible] Reduce default mem_size num_cpus
by Nicolas Chauvet
commit 45aba257992ff4baa101499a5e1b530084fa122e
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Nov 25 11:42:40 2016 +0100
Reduce default mem_size num_cpus
inventory/group_vars/all | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/inventory/group_vars/all b/inventory/group_vars/all
index 609d659..c0ff01d 100644
--- a/inventory/group_vars/all
+++ b/inventory/group_vars/all
@@ -30,8 +30,8 @@ custom6_rules: []
# defaults for virt installs
ks_url: http://infrastructure.rpmfusion.org/repo/rhel/ks/kvm-rhel-7
ks_repo: http://mirror.centos.org/centos/7/os/x86_64/
-mem_size: 2048
-num_cpus: 2
+mem_size: 1024
+num_cpus: 1
lvm_size: 20000
# Default netmask. Almost all our phx2 nets are /24's with the
8 years
[ansible] Remove ks_repo already in all
by Nicolas Chauvet
commit 7e82a62f4f8ed1d97b4b12a1834328367f05d18b
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Nov 25 11:34:57 2016 +0100
Remove ks_repo already in all
inventory/host_vars/db02.online.rpmfusion.net | 2 +-
inventory/host_vars/koji01.online.rpmfusion.net | 2 +-
inventory/host_vars/pkgs01.online.rpmfusion.net | 2 +-
inventory/host_vars/se01.online.rpmfusion.net | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/inventory/host_vars/db02.online.rpmfusion.net b/inventory/host_vars/db02.online.rpmfusion.net
index 43a30bb..ff2c2a3 100644
--- a/inventory/host_vars/db02.online.rpmfusion.net
+++ b/inventory/host_vars/db02.online.rpmfusion.net
@@ -8,7 +8,7 @@ vmhost: hv01.online.rpmfusion.net
datacenter: online
ks_url: http://192.168.181.254/install/ks/db02.ks
-ks_repo: http://mirror.centos.org/centos/7/os/x86_64/
+
# This is a generic list, monitored by collectd
databases:
diff --git a/inventory/host_vars/koji01.online.rpmfusion.net b/inventory/host_vars/koji01.online.rpmfusion.net
index 181a737..cf2713c 100644
--- a/inventory/host_vars/koji01.online.rpmfusion.net
+++ b/inventory/host_vars/koji01.online.rpmfusion.net
@@ -2,7 +2,7 @@ nm: 255.255.255.0
gw: 195.154.185.1
dns: 62.210.16.6
ks_url: http://192.168.181.254/install/ks/koji01.ks
-ks_repo: http://192.168.181.254/repo/redhat/el7Server/x86_64/os/
+
volgroup: /dev/vg_hv03_virt
eth0_ip: 212.83.132.100
eth1_ip: 192.168.181.135
diff --git a/inventory/host_vars/pkgs01.online.rpmfusion.net b/inventory/host_vars/pkgs01.online.rpmfusion.net
index e42ba99..7af0f31 100644
--- a/inventory/host_vars/pkgs01.online.rpmfusion.net
+++ b/inventory/host_vars/pkgs01.online.rpmfusion.net
@@ -2,7 +2,7 @@ nm: 255.255.255.0
gw: 195.154.185.1
dns: 62.210.16.6
ks_url: http://192.168.181.254/install/ks/pks01.ks
-ks_repo: http://192.168.181.254/repo/redhat/el7Server/x86_64/os/
+
volgroup: /dev/vg_hv03_virt
eth0_ip: 212.129.31.198
eth1_ip: 192.168.181.137
diff --git a/inventory/host_vars/se01.online.rpmfusion.net b/inventory/host_vars/se01.online.rpmfusion.net
index f273711..5d44e82 100644
--- a/inventory/host_vars/se01.online.rpmfusion.net
+++ b/inventory/host_vars/se01.online.rpmfusion.net
@@ -2,7 +2,7 @@ nm: 255.255.255.0
gw: 195.154.185.1
dns: 62.210.16.6
ks_url: http://192.168.181.254/install/ks/se01.ks
-ks_repo: http://192.168.181.254/repo/redhat/el7Server/x86_64/os/
+
volgroup: /dev/vg_hv03_virt
eth0_ip: 192.168.181.1
vmhost: hv01.online.rpmfusion.net
8 years
[ansible] Add moin config theme
by Nicolas Chauvet
commit 34340b96eb03afcc9e0ada6206ac756db925b009
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 18:49:06 2016 +0100
Add moin config theme
roles/moin/tasks/main.yml | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/roles/moin/tasks/main.yml b/roles/moin/tasks/main.yml
index 4256738..788a32b 100644
--- a/roles/moin/tasks/main.yml
+++ b/roles/moin/tasks/main.yml
@@ -29,6 +29,12 @@
- config
- moin
+- name: copy moin config theme
+ copy: src={{ files }}/moin/rpmfusion.py dest=/var/www/moin/data/plugin/theme/
+ tags:
+ - config
+ - moin
+
- name: deploy moin wikiconfig.py
copy: src={{ files }}/moin/wikiconfig.py dest=/var/www/moin/wikiconfig.py
tags:
8 years
[ansible] Copy rpmfusion-theme
by Nicolas Chauvet
commit f16a0b4b12f5a670466bb570c7e07419b4a22bc8
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 17:28:52 2016 +0100
Copy rpmfusion-theme
files/moin/rpmfusion.py | 274 +++++++++++++++++++++++++++++++++++++++++++++
roles/moin/tasks/main.yml | 6 +
2 files changed, 280 insertions(+), 0 deletions(-)
---
diff --git a/files/moin/rpmfusion.py b/files/moin/rpmfusion.py
new file mode 100644
index 0000000..7d8feeb
--- /dev/null
+++ b/files/moin/rpmfusion.py
@@ -0,0 +1,274 @@
+# -*- coding: utf-8 -*-
+"""
+ MoinMoin technical theme
+
+ @copyright: (c) 2003-2004 by Radomir Dopieralski
+ @license: GNU GPL, see COPYING for details.
+"""
+
+from MoinMoin.theme import ThemeBase
+from MoinMoin import wikiutil
+from MoinMoin.Page import Page
+
+
+class Theme(ThemeBase):
+
+ name = "rpmfusion"
+ stylesheets = (
+ # media basename
+ ('all', 'style'),
+ )
+ stylesheets_print=stylesheets
+ stylesheets_projection=stylesheets
+
+ def headscript(self, d):
+ return u''
+
+ def guiEditorScript(self, d):
+ return u''
+
+ def externalScript(self, d):
+ return u''
+
+ def header(self, d, **kw):
+ """ Assemble wiki header
+
+ @param d: parameter dictionary
+ @rtype: unicode
+ @return: page header html
+ """
+ html = [
+ # Pre header custom html
+ self.emit_custom_html(self.cfg.page_header1),
+
+ self.msg(d),
+ u'<div id="header">',
+ self.searchform(d),
+ self.logo(),
+ self.navibar(d),
+ u'<hr>',
+ u'</div>',
+ self.actionbar(d, *kw),
+ self.trail(d),
+ self.login(d),
+
+ # Post header custom html (not recommended)
+ self.emit_custom_html(self.cfg.page_header2),
+
+ # Start of page
+ self.startPage(),
+ self.pagepath(d),
+ self.title(d),
+ ]
+ return u'\n'.join(html)
+
+ def editorheader(self, d, **kw):
+ html = [
+ self.msg(d),
+ # Start of page
+ self.startPage(),
+ ]
+ return u'\n'.join(html)
+
+ def footer(self, d, **keywords):
+ """ Assemble wiki footer
+
+ @param d: parameter dictionary
+ @keyword ...:...
+ @rtype: unicode
+ @return: page footer html
+ """
+ page = d['page']
+ html = [
+ # End of page
+ self.pageinfo(page),
+ self.endPage(),
+
+ # Pre footer custom html (not recommended!)
+ self.emit_custom_html(self.cfg.page_footer1),
+
+ # Footer
+ u'<div id="footer">',
+ u'</div>',
+
+ # Post footer custom html
+ self.emit_custom_html(self.cfg.page_footer2),
+ ]
+ return u'\n'.join(html)
+
+
+ def actionbar(self, d, **kw):
+ parts = (
+ self.edit_link(d, *kw), ' ',
+ self.info_link(d, *kw), ' ',
+# self.attach_link(d, *kw),
+ self.more_link(d, *kw),
+ )
+ return '<div id="iconbar">%s</div>' % ''.join(parts)
+
+ def externalScript(self, d):
+ return u''
+
+ def guiEditorScript(self, d):
+ return u''
+
+ def headscript(self, d):
+ return u''
+
+ def loggededitbar(self, d):
+ """Display edit bar only for the logged in users"""
+ if self.request.user.valid:
+ return self.editbar(d)
+ else:
+ return ''
+
+ def recentchanges_entry(self, d):
+ _ = self.request.getText
+ if d['comments']:
+ rccomm = ''
+ for c in d['comments']:
+ rccomm += ' <b>%d</b> ' % c[0];
+ rccomm += c[1];
+ else:
+ rccomm = ''
+ html = (u'''<li><b class="rctime">%s</b> %s %s . . . . <span class="rcauth">%s</span> <i class="rccomm">%s</i></li>''' % (
+ d['time_html'],
+ d['pagelink_html'],
+ d['icon_html'],
+ ', '.join(d['editors']),
+ rccomm,
+ ))
+ return html
+
+ def recentchanges_daybreak(self, d):
+ return u'</ul><h2 class="rcdaybreak">%s</h2><ul>' % d['date']
+
+ def recentchanges_header(self, d):
+ return u'<div class="recentchanges"%s><ul>' % self.ui_lang_attr()
+
+ def recentchanges_footer(self, d):
+ return u'</ul></div>'
+
+ def login(self, d):
+ request = self.request
+ _ = request.getText
+
+ if request.user.valid and request.user.name:
+ return u''
+ reg_link = d['page'].link_to(
+ request,
+ text=_('Create account'),
+ querystr={'action': 'newaccount'},
+ id='newaccount',
+ rel='nofollow')
+
+ return '''
+<form action="" method="POST" id="loginform">
+<div lang="en" dir="ltr">
+ %s
+ <fieldset><legend>Login</legend>
+ <input type="hidden" name="action" value="login">
+ <label>%s<input type="text" name="name" id="loginname"></label>
+ <label>%s<input type="password" name="password" id="loginpass"></label>
+ </fieldset>
+ <input type="submit" name="login" value="Login" id="loginsubmit">
+</div>
+</form>
+''' % (reg_link, _('User'), _('Password'))
+
+ def info_link(self, d, **keywords):
+ _ = self.request.getText
+ page = d['page']
+ if not self.shouldShowEditbar(page):
+ return u''
+ params = (wikiutil.quoteWikinameURL(page.page_name) +
+ '?action=info')
+ text = _('Info', formatted=False)
+ attrs = {'id': "infolink"}
+ return wikiutil.link_tag(self.request, params, text, **attrs)
+
+ def edit_link(self, d, **keywords):
+ _ = self.request.getText
+ page = d['page']
+ text = _('Edit', formatted=False)
+# if not self.shouldShowEditbar(page):
+# return u''
+ if not (page.isWritable() and
+ self.request.user.may.write(page.page_name)):
+ return u'<span id="editlink">%s</span>' % text
+ params = (wikiutil.quoteWikinameURL(page.page_name) +
+ '?action=edit')
+ attrs = {'id': "editlink"}
+ return wikiutil.link_tag(self.request, params, text, **attrs)
+
+
+ def more_link(self, d, **keywords):
+ _ = self.request.getText
+ page = d['page']
+ if not self.shouldShowEditbar(page):
+ return u''
+ params = (wikiutil.quoteWikinameURL(page.page_name) +
+ '?action=allactions')
+ text = _('Other', formatted=False)
+ attrs = {'id': "otherlink"}
+ return wikiutil.link_tag(self.request, params, text, **attrs)
+
+ def attach_link(self, d, **keywords):
+ _ = self.request.getText
+ page = d['page']
+ if not self.shouldShowEditbar(page):
+ return u''
+ if not (page.isWritable() and
+ self.request.user.may.write(page.page_name)):
+ return u''
+ params = (wikiutil.quoteWikinameURL(page.page_name) +
+ '?action=AttachFile')
+ text = _('Attach', formatted=False)
+ attrs = {'id': "attachlink"}
+ return wikiutil.link_tag(self.request, params, text, **attrs)
+
+ def pagepath(self, d):
+ """ Assemble the title (now using breadcrumbs)
+
+ @param d: parameter dictionary
+ @rtype: string
+ @return: title html
+ """
+ _ = self.request.getText
+ content = []
+ if d['title_text'] == d['page_name']: # just showing a page, no action
+ curpage = ''
+ segments = d['page_name'].split('/')
+ for s in segments[:-1]:
+ curpage += s
+ content.append("%s" % Page(self.request, curpage).link_to(self.request, s))
+ content.append("/")
+ curpage += '/'
+
+ html = '''
+<div id="pagepath">
+%s
+</div>
+''' % "".join(content)
+ return html
+
+ def title(self, d):
+ """ Assemble the title (now using breadcrumbs)
+
+ @param d: parameter dictionary
+ @rtype: string
+ @return: title html
+ """
+ title = d['title_text'].split('/')[-1]
+ html = '<h1 id="pagelocation">%s</h1>' % title
+ return html
+
+def execute(request):
+ """ Generate and return a theme object
+
+ @param request: the request object
+ @rtype: Theme instance
+ @return: Theme object
+ """
+ return Theme(request)
+
diff --git a/roles/moin/tasks/main.yml b/roles/moin/tasks/main.yml
index 811213e..4256738 100644
--- a/roles/moin/tasks/main.yml
+++ b/roles/moin/tasks/main.yml
@@ -23,6 +23,12 @@
- config
- moin
+- name: copy moin theme
+ copy: src={{ files }}/moin/rpmfusion-theme/ dest=/var/www/moin/rpmfusion-theme
+ tags:
+ - config
+ - moin
+
- name: deploy moin wikiconfig.py
copy: src={{ files }}/moin/wikiconfig.py dest=/var/www/moin/wikiconfig.py
tags:
8 years