service should start on boot

This commit is contained in:
Ruben Blanco 2023-10-23 17:23:21 +02:00
parent 5cbaf8397d
commit 47c119c678
3 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# restart ssh service to apply changes
- name: Restart ssh service
service:
name: ssh
name: "{{ ssh_daemon }}"
state: restarted

View File

@ -28,6 +28,12 @@
line: "#PermitRootLogin prohibit-password"
state: present
notify: Restart ssh service
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# service should start on boot.
- name: service should start on boot
service:
name: "{{ ssh_daemon }}"
enabled: yes
#- name: change sshd_config to no root password
# copy:
# src: "{{ source_path_ssh }}"

View File

@ -1,4 +1,5 @@
---
ssh_daemon: ssh
path_sshd_config_file: /etc/ssh/sshd_config
path_bashrc_root: /root/.bashrc
export_LS_OPTIONS: export LS_OPTIONS='--color=auto'