Puppet Class: profile::planet

Defined in:
modules/profile/manifests/planet.pp

Overview

sets up a planet RSS feed aggregator (planet-rawdog aka planet 3.0)

$domain_name: domain name used, e.g. wikimedia.org or wmflabs.org

$meta_link: protocol-relative link to a meta or index page for all planets

$http_proxy: since we are on a private IP now we need to proxy to fetch external URLs

$languages: translated strings for the UI in various languages

list all planet languages and translations for index.html.tmpl here.
configurations, directories and cronjobs are auto-created from this hash.

Parameters:

  • domain_name (String) (defaults to: lookup('profile::planet::domain_name'))
  • meta_link (Stdlib::HTTPUrl) (defaults to: lookup('profile::planet::meta_link'))
  • http_proxy (Stdlib::HTTPUrl) (defaults to: lookup('profile::planet::http_proxy'))
  • languages (Hash) (defaults to: { ar => { 'subscribe' => 'اشترك', 'subscriptions' => 'الاشتراكات', 'lastupdated' => 'اخر تحديث', 'alltimesutc' => '،كافة الأوقات مبينة بالتوقيت العالمي المنسق', 'poweredby' => 'بدعم من', 'wikimedia' => 'ويكيميديا', 'planetarium' => 'بلانيتاريوم', }, bg => { 'subscribe' => 'Абониране', 'subscriptions' => 'Абонамент', 'lastupdated' => 'за последно са актуализирани', 'alltimesutc' => 'All times are UTC.', 'poweredby' => 'работи по софтуера на', 'wikimedia' => 'Уикимедия', 'planetarium' => 'планетарий', }, cs => { 'subscribe' => 'Přihlásit odběr', 'subscriptions' => 'Odběry', 'lastupdated' => 'Poslední aktualizace', 'alltimesutc' => 'Všechny časy jsou v UTC.', 'poweredby' => 'Provozováno na', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetárium', }, de => { 'subscribe' => 'Abonnieren', 'subscriptions' => 'Teilnehmer', 'lastupdated' => 'Zuletzt aktualisiert', 'alltimesutc' => 'Alle Zeiten sind UTC.', 'poweredby' => 'Betrieben mit', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, el => { 'subscribe' => 'Παρακολούθηση', 'subscriptions' => 'Συνδρομές', 'lastupdated' => 'Τελευταία ενημέρωση', 'alltimesutc' => 'Όλες οι ώρες είναι UTC.', 'poweredby' => 'Υποστηρίζεται από το', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, en => { 'subscribe' => 'Subscribe', 'subscriptions' => 'Subscriptions', 'lastupdated' => 'Last updated', 'alltimesutc' => 'All times are UTC.', 'poweredby' => 'Powered by', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, es => { 'subscribe' => 'Suscribirse', 'subscriptions' => 'Suscripciones', 'lastupdated' => 'Última actualización', 'alltimesutc' => 'Las horas mostradas son en UTC.', 'poweredby' => 'Impulsado por', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetario', }, fr => { 'subscribe' => 'S\'abonner', 'subscriptions' => 'Abonnements', 'lastupdated' => 'Dernière mise à jour', 'alltimesutc' => 'Les heures sont notées en UTC (GMT).', 'poweredby' => 'Propulsé par', 'wikimedia' => 'Wikimédia', 'planetarium' => 'Planetarium', }, gmq => { 'subscribe' => 'Abonnér', 'subscriptions' => 'Abonnementer', 'lastupdated' => 'Senest opdateret', 'alltimesutc' => 'Alle tider är UTC.', 'poweredby' => 'Drivs af', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, id => { 'subscribe' => 'Berlangganan', 'subscriptions' => 'Langganan', 'lastupdated' => 'Terakhir diperbarui', 'alltimesutc' => 'Waktu dalam UTC.', 'poweredby' => 'Dimotori oleh', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, it => { 'subscribe' => 'Abbonati', 'subscriptions' => 'Sottoscrizioni', 'lastupdated' => 'Last updated', 'alltimesutc' => 'Tutti gli orari sono UTC.', 'poweredby' => 'Reso possibile da', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, pl => { 'subscribe' => 'Subskrybuj', 'subscriptions' => 'Subskrypcje', 'lastupdated' => 'Ostatnia zmiana', 'alltimesutc' => 'Wszystkie czasy podane w UTC.', 'poweredby' => 'Witryna napędzana przez', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, pt => { 'subscribe' => 'Subscrever', 'subscriptions' => 'Subcrições', 'lastupdated' => 'Última actualização', 'alltimesutc' => 'Todos os horários estão em UTC.', 'poweredby' => 'Alimentado por', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetário', }, ro => { 'subscribe' => 'Abonare', 'subscriptions' => 'Abonări', 'lastupdated' => 'Ultima actualizare', 'alltimesutc' => 'Toate orele sunt în UTC.', 'poweredby' => 'Motorizat de', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetariu', }, ru => { 'subscribe' => 'Подписаться', 'subscriptions' => 'Подписки', 'lastupdated' => 'Последнее обновление', 'alltimesutc' => 'Часовой пояс: UTC.', 'poweredby' => 'Работает на', 'wikimedia' => 'Викимедиа', 'planetarium' => 'Планетарий', }, sq => { 'subscribe' => 'Abonoj', 'subscriptions' => 'Abonimet', 'lastupdated' => 'Last updated', 'alltimesutc' => 'All times are UTC.', 'poweredby' => 'Mundësuar nga', 'wikimedia' => 'Wikimedia', 'planetarium' => 'Planetarium', }, uk => { 'subscribe' => 'Підписатися', 'subscriptions' => 'Підписалися', 'lastupdated' => 'Обновлено', 'alltimesutc' => 'Весь час в UTC.', 'poweredby' => 'Створено за допомогою', 'wikimedia' => 'Вікімедіа', 'planetarium' => 'Планетарій', }, zh => { 'subscribe' => '訂閱', 'subscriptions' => '收錄', 'lastupdated' => '最近更新', 'alltimesutc' => '所有時間以UTC為準', 'poweredby' => 'Powered by', 'wikimedia' => '維基媒體', 'planetarium' => '天文館', }, })


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'modules/profile/manifests/planet.pp', line 13

class profile::planet (
    String $domain_name = lookup('profile::planet::domain_name'),
    Stdlib::HTTPUrl $meta_link = lookup('profile::planet::meta_link'),
    Stdlib::HTTPUrl $http_proxy = lookup('profile::planet::http_proxy'),
    Hash $languages = {
        ar => {
            'subscribe'     => 'اشترك',
            'subscriptions' => 'الاشتراكات',
            'lastupdated'   => 'اخر تحديث',
            'alltimesutc'   => '،كافة الأوقات مبينة بالتوقيت العالمي المنسق',
            'poweredby'     => 'بدعم من',
            'wikimedia'     => 'ويكيميديا',
            'planetarium'   => 'بلانيتاريوم',
        },
        bg => {
            'subscribe'     => 'Абониране',
            'subscriptions' => 'Абонамент',
            'lastupdated'   => 'за последно са актуализирани',
            'alltimesutc'   => 'All times are UTC.',
            'poweredby'     => 'работи по софтуера на',
            'wikimedia'     => 'Уикимедия',
            'planetarium'   => 'планетарий',
        },
        cs => {
            'subscribe'     => 'Přihlásit odběr',
            'subscriptions' => 'Odběry',
            'lastupdated'   => 'Poslední aktualizace',
            'alltimesutc'   => 'Všechny časy jsou v UTC.',
            'poweredby'     => 'Provozováno na',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetárium',
        },
        de => {
            'subscribe'     => 'Abonnieren',
            'subscriptions' => 'Teilnehmer',
            'lastupdated'   => 'Zuletzt aktualisiert',
            'alltimesutc'   => 'Alle Zeiten sind UTC.',
            'poweredby'     => 'Betrieben mit',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        el => {
            'subscribe'     => 'Παρακολούθηση',
            'subscriptions' => 'Συνδρομές',
            'lastupdated'   => 'Τελευταία ενημέρωση',
            'alltimesutc'   => 'Όλες οι ώρες είναι UTC.',
            'poweredby'     => 'Υποστηρίζεται από το',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        en => {
            'subscribe'     => 'Subscribe',
            'subscriptions' => 'Subscriptions',
            'lastupdated'   => 'Last updated',
            'alltimesutc'   => 'All times are UTC.',
            'poweredby'     => 'Powered by',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        es => {
            'subscribe'     => 'Suscribirse',
            'subscriptions' => 'Suscripciones',
            'lastupdated'   => 'Última actualización',
            'alltimesutc'   => 'Las horas mostradas son en UTC.',
            'poweredby'     => 'Impulsado por',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetario',
        },
        fr => {
            'subscribe'     => 'S\'abonner',
            'subscriptions' => 'Abonnements',
            'lastupdated'   => 'Dernière mise à jour',
            'alltimesutc'   => 'Les heures sont notées en UTC (GMT).',
            'poweredby'     => 'Propulsé par',
            'wikimedia'     => 'Wikimédia',
            'planetarium'   => 'Planetarium',
        },
        gmq => {
            'subscribe'     => 'Abonnér',
            'subscriptions' => 'Abonnementer',
            'lastupdated'   => 'Senest opdateret',
            'alltimesutc'   => 'Alle tider är UTC.',
            'poweredby'     => 'Drivs af',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        id => {
            'subscribe'     => 'Berlangganan',
            'subscriptions' => 'Langganan',
            'lastupdated'   => 'Terakhir diperbarui',
            'alltimesutc'   => 'Waktu dalam UTC.',
            'poweredby'     => 'Dimotori oleh',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        it => {
            'subscribe'     => 'Abbonati',
            'subscriptions' => 'Sottoscrizioni',
            'lastupdated'   => 'Last updated',
            'alltimesutc'   => 'Tutti gli orari sono UTC.',
            'poweredby'     => 'Reso possibile da',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        pl => {
            'subscribe'     => 'Subskrybuj',
            'subscriptions' => 'Subskrypcje',
            'lastupdated'   => 'Ostatnia zmiana',
            'alltimesutc'   => 'Wszystkie czasy podane w UTC.',
            'poweredby'     => 'Witryna napędzana przez',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',
        },
        pt => {
            'subscribe'     => 'Subscrever',
            'subscriptions' => 'Subcrições',
            'lastupdated'   => 'Última actualização',
            'alltimesutc'   => 'Todos os horários estão em UTC.',
            'poweredby'     => 'Alimentado por',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetário',
        },
        ro => {
            'subscribe'     => 'Abonare',
            'subscriptions' => 'Abonări',
            'lastupdated'   => 'Ultima actualizare',
            'alltimesutc'   => 'Toate orele sunt în UTC.',
            'poweredby'     => 'Motorizat de',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetariu',

        },
        ru => {
            'subscribe'     => 'Подписаться',
            'subscriptions' => 'Подписки',
            'lastupdated'   => 'Последнее обновление',
            'alltimesutc'   => 'Часовой пояс: UTC.',
            'poweredby'     => 'Работает на',
            'wikimedia'     => 'Викимедиа',
            'planetarium'   => 'Планетарий',

        },
        sq => {
            'subscribe'     => 'Abonoj',
            'subscriptions' => 'Abonimet',
            'lastupdated'   => 'Last updated',
            'alltimesutc'   => 'All times are UTC.',
            'poweredby'     => 'Mundësuar nga',
            'wikimedia'     => 'Wikimedia',
            'planetarium'   => 'Planetarium',

        },
        uk => {
            'subscribe'     => 'Підписатися',
            'subscriptions' => 'Підписалися',
            'lastupdated'   => 'Обновлено',
            'alltimesutc'   => 'Весь час в UTC.',
            'poweredby'     => 'Створено за допомогою',
            'wikimedia'     => 'Вікімедіа',
            'planetarium'   => 'Планетарій',
        },
        zh => {
            'subscribe'     => '訂閱',
            'subscriptions' => '收錄',
            'lastupdated'   => '最近更新',
            'alltimesutc'   => '所有時間以UTC為準',
            'poweredby'     => 'Powered by',
            'wikimedia'     => '維基媒體',
            'planetarium'   => '天文館',
        },
    }
) {

    class {'::planet':
        domain_name => $domain_name,
        languages   => $languages,
        meta_link   => $meta_link,
        http_proxy  => $http_proxy,
    }

    class {'::httpd':
        modules => ['rewrite', 'headers'],
    }

    ferm::service { 'planet-http-envoy':
        proto  => 'tcp',
        port   => '80',
        srange => "(${::ipaddress} ${::ipaddress6})",
    }
}