Simplify tasks
This commit is contained in:
parent
4a1aca4621
commit
4876a64e6c
|
@ -1,4 +1,4 @@
|
|||
- name: restart sshd
|
||||
ansible.builtin.service:
|
||||
name: "{{ ssh_service }}"
|
||||
name: sshd
|
||||
state: restarted
|
||||
|
|
|
@ -2,12 +2,3 @@
|
|||
ansible.builtin.package:
|
||||
name: openssh
|
||||
state: present
|
||||
|
||||
- set_fact:
|
||||
ssh_service: sshd
|
||||
|
||||
- name: Enable service.
|
||||
ansible.builtin.service:
|
||||
name: "{{ ssh_service }}"
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
|
@ -2,12 +2,3 @@
|
|||
ansible.builtin.package:
|
||||
name: ssh
|
||||
state: present
|
||||
|
||||
- set_fact:
|
||||
ssh_service: sshd
|
||||
|
||||
- name: Enable service.
|
||||
ansible.builtin.service:
|
||||
name: "{{ ssh_service }}"
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
|
@ -2,12 +2,3 @@
|
|||
ansible.builtin.package:
|
||||
name: ssh
|
||||
state: present
|
||||
|
||||
- set_fact:
|
||||
ssh_service: sshd
|
||||
|
||||
- name: Enable service.
|
||||
ansible.builtin.service:
|
||||
name: "{{ ssh_service }}"
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
- ansible.builtin.include_tasks: "{{ ansible_lsb['id'] }}.yml"
|
||||
|
||||
- name: Enable service.
|
||||
ansible.builtin.service:
|
||||
name: sshd
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Ensure sshd_config is setup.
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
|
|
Loading…
Reference in New Issue