Changes for SSHD.
This commit is contained in:
parent
a79918941c
commit
6f403491ca
@ -6,7 +6,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
sshfs: sshfs
|
sshfs: sshfs
|
||||||
locate: locate
|
locate: locate
|
||||||
sshd: openssh-server
|
opensshd: openssh-server
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
sshfs: sshfs
|
sshfs: sshfs
|
||||||
locate: mlocate
|
locate: mlocate
|
||||||
sshd: openssh
|
opensshd: openssh
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
---
|
---
|
||||||
# Define program names for service builtin.
|
# Define program names for service builtin.
|
||||||
|
|
||||||
- name: General | Facts | Service | Linux
|
- name: General | Facts | Service | All
|
||||||
set_fact:
|
set_fact:
|
||||||
cups: cups
|
cups: cups
|
||||||
cups_pattern: cupsd
|
cups_pattern: cupsd
|
||||||
cups_browse: cups-browsed
|
cups_browse: cups-browsed
|
||||||
cups_browse_pattern: cups-browsed
|
cups_browse_pattern: cups-browsed
|
||||||
|
sshd: sshd
|
||||||
|
sshd_pattern: sshd
|
||||||
|
sshfs_leet_cmd: "sshfs {{ leet_ssh }}: /mnt/leet -o allow_other,_netdev"
|
||||||
|
|
||||||
|
|
||||||
|
- name: General | Facts | Service | Linux
|
||||||
|
set_fact:
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
|
||||||
- name: General | Facts | Service | FreeBSD
|
- name: General | Facts | Service | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
cups: cups
|
|
||||||
cups_pattern: cupsd
|
|
||||||
cups_browse: cups-browsed
|
|
||||||
cups_browse_pattern: cups-browsed
|
|
||||||
sshfs_leet_cmd: "sshfs {{ leet_ssh }}: /mnt/leet -o allow_other,_netdev"
|
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
@ -30,3 +30,20 @@
|
|||||||
pattern: "{{ cups_browse_pattern }}"
|
pattern: "{{ cups_browse_pattern }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: no
|
||||||
|
|
||||||
|
- name: General | Software | Services | Enable SSHD (Linux?)
|
||||||
|
service:
|
||||||
|
name: "{{ sshd }}"
|
||||||
|
pattern: "{{ sshd_pattern }}"
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
|
|
||||||
|
- name: General | Software | Services | Create SSHFS rc.conf Entry (FreeBSD)
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/rc.conf
|
||||||
|
regexp: '^sshd_enable='
|
||||||
|
line: 'sshd_enable="YES" # MANAGED BY ANSIBLE'
|
||||||
|
state: present
|
||||||
|
create: yes
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
@ -1,15 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Cron jobs specific to FreeBSD
|
# Cron jobs specific to FreeBSD
|
||||||
|
|
||||||
- name: General | Cron | Ansible | FreeBSD | Enable SSHFS Job
|
|
||||||
cron:
|
|
||||||
user: ansible
|
|
||||||
name: "1337 SSHFS"
|
|
||||||
special_time: reboot
|
|
||||||
job: "sudo {{ sshfs_leet_cmd }}"
|
|
||||||
state: present
|
|
||||||
disabled: no
|
|
||||||
|
|
||||||
- name: General | Cron | Ansible | FreeBSD | Enable Security Update
|
- name: General | Cron | Ansible | FreeBSD | Enable Security Update
|
||||||
cron:
|
cron:
|
||||||
user: ansible
|
user: ansible
|
||||||
|
Loading…
x
Reference in New Issue
Block a user