Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit b8c498df authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

refactor: create new play for ssh configuration

parent 89da094c
No related branches found
No related tags found
1 merge request!43Resolve "feat(ynh_config): add the posibility to change SSH Port"
Pipeline #11536 passed with warnings
......@@ -38,3 +38,5 @@ ynh_autoupdate:
# apps: True
# system: True
# dest_script: "/usr/local/bin/"
# ynh_ssh_port: "812"
......@@ -33,19 +33,8 @@
- yunohost
- update
- name: Change SSH port
block:
- name: Get current SSH setting
ansible.builtin.command:
yunohost settings get security.ssh.port
register: _ynh_ssh_current_value
changed_when: False
- name: Set new SSH setting
ansible.builtin.command:
"yunohost settings set security.ssh.port -v {{ ynh_ssh_port }}"
when: _ynh_ssh_current_value != ynh_ssh_port
changed_when: False
- name: Configure Yunohost SSH port
ansible.builtin.include_tasks: sshd_configuration.yml
when: ynh_ssh_port
tags:
- yunohost
......
---
#-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-present Lydra https://www.lydra.fr/ #
# #
# this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# this program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
#-----------------------------------------------------------------------------#
- name: Change SSH port
ansible.builtin.command:
"yunohost settings set security.ssh.port -v {{ ynh_ssh_port }}"
tags:
- yunohost
- ssh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment