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 # restart ssh service to apply changes
- name: Restart ssh service - name: Restart ssh service
service: service:
name: ssh name: "{{ ssh_daemon }}"
state: restarted state: restarted

View File

@ -28,6 +28,12 @@
line: "#PermitRootLogin prohibit-password" line: "#PermitRootLogin prohibit-password"
state: present state: present
notify: Restart ssh service 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 #- name: change sshd_config to no root password
# copy: # copy:
# src: "{{ source_path_ssh }}" # src: "{{ source_path_ssh }}"

View File

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