Upgrade config.json schema with ansible

We maintain an ansible role for upgrading our mattermost installation. Is it appropriate to upgrade the config.json schema via cli command? Does it update the schema?

For example:

- name: Upgrade config schema by setting a temporary value
  command: "{{ MATTERMOST_INSTALL_PATH }}/mattermost/bin/mattermost config set ServiceSettings.ReadTimeout 3000"
- name: Revert temporary setting
  command: "{{ MATTERMOST_INSTALL_PATH }}/mattermost/bin/mattermost config set ServiceSettings.ReadTimeout 300"

- name: Restart Mattermost
  systemd:
    name: mattermost
    state: restarted
1 Like

Hi,

I don’t think this should be a problem. In the past I’ve simply used for example sed to modify the json file (meanwhile using jq to always generate valid json) and this worked out good.

One hint though, for most modifications to the config.json you do not need to restart Mattermost as it will simply reload itself when the file is modified.

Thank you! What i was wondering is if the new schema is generated after an upgrade by modifying config.json with cli. As a substitution for task 13. from https://docs.mattermost.com/administration/upgrade.html

13. Upgrade your config.json schema:

1. Open the System Console and change a setting, then revert it. This should enable the Save button for that page.
2. Click  **Save** .
3. Refresh the page.

I’m honestly not quite sure what kind of schema this is referring to. AFAIK there is no version/schema information in the file. Also did not need to perform this action on any upgrade I have performed in the past years.