Verified Commit 4dbc6a7a authored by Luc Didry's avatar Luc Didry

Change PT’s root password from Salt

parent 89fbf534
Pipeline #133765 passed with stages
in 46 seconds
......@@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2019-05-06T20:35:01.735Z\n"
"PO-Revision-Date: 2019-05-06T20:35:01.735Z\n"
"POT-Creation-Date: 2019-05-10T17:10:33.247Z\n"
"PO-Revision-Date: 2019-05-10T17:10:33.247Z\n"
"Language: en\n"
msgid "PeerTube pillar generator"
......@@ -89,6 +89,15 @@ msgstr "Setting up email sending"
msgid "Use the email daemon of your PeerTube server"
msgstr "Use the email daemon of your PeerTube server"
msgid "Admin account of your instance"
msgstr "Admin account of your instance"
msgid "Password of the {{- opentag}}root{{- endtag}} account"
msgstr "Password of the {{- opentag}}root{{- endtag}} account"
msgid "Please choose a strong password that you don’t use elsewhere"
msgstr "Please choose a strong password that you don’t use elsewhere"
msgid "Email sending server"
msgstr "Email sending server"
......
......@@ -21,6 +21,9 @@
"Normally list explicit videos": "Normally list explicit videos",
"Setting up email sending": "Setting up email sending",
"Use the email daemon of your PeerTube server": "Use the email daemon of your PeerTube server",
"Admin account of your instance": "Admin account of your instance",
"Password of the {{- opentag}}root{{- endtag}} account": "Password of the {{- opentag}}root{{- endtag}} account",
"Please choose a strong password that you don’t use elsewhere": "Please choose a strong password that you don’t use elsewhere",
"Email sending server": "Email sending server",
"Port": "Port",
"Username": "Username",
......
......@@ -21,6 +21,9 @@
"Normally list explicit videos": "Lister normalement les vidéos explicites",
"Setting up email sending": "Paramètrage de l’envoi de courriels",
"Use the email daemon of your PeerTube server": "Utiliser le dæmon de courriel de votre serveur PeerTube",
"Admin account of your instance": "Compte administrateur de votre instance",
"Password of the {{- opentag}}root{{- endtag}} account": "Mot de passe du compte {{- opentag}}root{{- endtag}}",
"Please choose a strong password that you don’t use elsewhere": "Veuillez choisir un mot de passe fort que vous n’utilisez nulle part ailleurs",
"Email sending server": "Serveur d’envoi de courriel",
"Port": "Port",
"Username": "Identifiant",
......
......@@ -103,6 +103,25 @@
</div>
</div>
</article>
<article class="accordion">
<div class="accordion-header toggle">
{{ $t('Admin account of your instance') }}
</div>
<div class="accordion-body">
<div class="accordion-content">
<div class="field" v-if="loaded">
<label for="root_password" class="label" v-html="$t('Password of the {{- opentag}}root{{- endtag}} account', { opentag: openCode, endtag: endCode })">
</label>
<p>
{{ $t('Please choose a strong password that you don’t use elsewhere') }}
</p>
<div class="control">
<input id="root_password" class="input" v-model="json.root_password">
</div>
</div>
</div>
</div>
</article>
<article class="accordion">
<div class="accordion-header toggle">
{{ $t('Setting up email sending') }}
......
......@@ -5,6 +5,7 @@ peertube:
enabled: false
email: root
hostname: peertube.example.com
root_password: ''
admin:
email: admin@example.com
smtp:
......
......@@ -136,8 +136,14 @@ salt://peertube/files/systemd.sh:
cmd.script:
- shell: /bin/bash
# The administrator password is automatically generated and can be found in the logs. You can set another password with:
# cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root
##################################
## Change root account password ##
##################################
change_pt_root_password:
cmd.run:
- name: echo {{ settings.root_password }} | NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root
- cwd: /var/www/peertube/peertube-latest
- runas: peertube
#########################
## Configure Webserver ##
......@@ -219,10 +225,3 @@ apticron:
- pattern: EMAIL="root"
- repl: EMAIL="{{ settings.apticron.email }}"
{% endif %}
############################
## Show the root password ##
############################
show_root_password:
cmd.run:
- name: 'echo -e "##############################################\n## PeerTube root password: "$(grep "User password" /var/log/peertube/peertube.log | sed -e "s@.*User password: @@")" ##\n##############################################\nYou can change PeerTube root password with that command:\ncd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root"'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment