mirror of https://github.com/zulip/zulip.git
puppet: Read camo key from zulip-secrets.conf.
This commit is contained in:
parent
2b40309029
commit
8b285ec0ff
|
@ -5,7 +5,16 @@ class zulip::camo {
|
||||||
]
|
]
|
||||||
package { $camo_packages: ensure => "installed" }
|
package { $camo_packages: ensure => "installed" }
|
||||||
|
|
||||||
# The configuration file is generated at install time
|
$camo_key = zulipsecret("secrets", "camo_key", '')
|
||||||
|
|
||||||
|
file { "/etc/default/camo":
|
||||||
|
require => Package[camo],
|
||||||
|
ensure => file,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
mode => 644,
|
||||||
|
content => template("zulip/camo_defaults.template.erb"),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
ENABLED=yes
|
||||||
|
PORT=9292
|
||||||
|
CAMO_KEY=<%= scope["zulip::camo::camo_key"] %>
|
|
@ -1,3 +0,0 @@
|
||||||
ENABLED=yes
|
|
||||||
PORT=9292
|
|
||||||
CAMO_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
@ -28,15 +28,6 @@ class zulip_internal::loadbalancer {
|
||||||
notify => Service["nginx"],
|
notify => Service["nginx"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/default/camo":
|
|
||||||
require => Package[camo],
|
|
||||||
ensure => file,
|
|
||||||
owner => "root",
|
|
||||||
group => "root",
|
|
||||||
mode => 644,
|
|
||||||
source => "puppet:///modules/zulip_internal/camo_defaults",
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/log2zulip.conf':
|
file { '/etc/log2zulip.conf':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => "zulip",
|
owner => "zulip",
|
||||||
|
|
|
@ -23,6 +23,8 @@ CAMO_CONFIG_FILENAME = '/etc/default/camo'
|
||||||
AUTOGENERATED_SETTINGS = ['shared_secret', 'avatar_salt', 'rabbitmq_password', 'local_database_password',
|
AUTOGENERATED_SETTINGS = ['shared_secret', 'avatar_salt', 'rabbitmq_password', 'local_database_password',
|
||||||
'initial_password_salt']
|
'initial_password_salt']
|
||||||
|
|
||||||
|
# TODO: We can eliminate this function if we refactor the install
|
||||||
|
# script to run generate_secrets before zulip-puppet-apply.
|
||||||
def generate_camo_config_file(camo_key):
|
def generate_camo_config_file(camo_key):
|
||||||
camo_config = """ENABLED=yes
|
camo_config = """ENABLED=yes
|
||||||
PORT=9292
|
PORT=9292
|
||||||
|
|
Loading…
Reference in New Issue