diff --git a/linux/base-config-debian/roles/config-root-user/tasks/main.yaml b/linux/base-config-debian/roles/config-root-user/tasks/main.yaml index 5ca6099..d19f1ca 100644 --- a/linux/base-config-debian/roles/config-root-user/tasks/main.yaml +++ b/linux/base-config-debian/roles/config-root-user/tasks/main.yaml @@ -23,8 +23,8 @@ # config sshd_config file , no root password - name: change sshd_config to no root password copy: - src: /etc/ssh/sshd_config.orig - dest: /etc/ssh/sshd_config + src: "{{ source_path_ssh }}" + dest: "{{ dest_path_ssh }}" remote_src: yes owner: root group: root @@ -35,7 +35,7 @@ # delete file sshd_config.orig - name: delete /etc/ssh/sshd_config.orig file file: - path: /etc/ssh/sshd_config.orig + path: "{{ source_path_ssh }}" state: absent notify: Restart ssh service #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/linux/base-config-debian/roles/config-root-user/vars/main.yaml b/linux/base-config-debian/roles/config-root-user/vars/main.yaml new file mode 100644 index 0000000..88d9bbc --- /dev/null +++ b/linux/base-config-debian/roles/config-root-user/vars/main.yaml @@ -0,0 +1,3 @@ +--- +source_path_ssh: /etc/ssh/sshd_config.orig +dest_path_ssh: /etc/ssh/sshd_config