mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
reformat yaml
This commit is contained in:
parent
2f88b2ce1b
commit
f17ff4a672
1 changed files with 53 additions and 17 deletions
|
|
@ -1,53 +1,89 @@
|
|||
---
|
||||
- name: Install OpenSSH
|
||||
pacman: name=openssh state=present
|
||||
pacman:
|
||||
name: openssh
|
||||
state: present
|
||||
|
||||
- name: Push OpenSSH daemon configuration file
|
||||
template: src=sshd_config.j2 dest=/etc/ssh/sshd_config
|
||||
template:
|
||||
src: sshd_config.j2
|
||||
dest: /etc/ssh/sshd_config
|
||||
|
||||
- name: Create OpenSSH systemd unit file directory
|
||||
file: path=/etc/systemd/system/sshd.socket.d state=directory
|
||||
file:
|
||||
path: /etc/systemd/system/sshd.socket.d
|
||||
state: directory
|
||||
|
||||
- name: Push OpenSSH socket unit file
|
||||
template: src=sshd-socket-override.conf.j2 dest=/etc/systemd/system/sshd.socket.d/override.conf
|
||||
template:
|
||||
src: sshd-socket-override.conf.j2
|
||||
dest: /etc/systemd/system/sshd.socket.d/override.conf
|
||||
notify:
|
||||
- reload systemd config
|
||||
- restart sshd
|
||||
|
||||
- name: Enable and start OpenSSH
|
||||
service: name=sshd.socket enabled=yes state=started
|
||||
service:
|
||||
name: sshd.socket
|
||||
enabled: yes
|
||||
state: started
|
||||
when: ssh.enable_sshd is defined and ssh.enable_sshd == True
|
||||
|
||||
- name: Disable and stop OpenSSH
|
||||
service: name=sshd.socket enabled=no state=stopped
|
||||
service:
|
||||
name: sshd.socket
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: ssh.enable_sshd is defined and ssh.enable_sshd == True
|
||||
|
||||
- name: Install sshfs
|
||||
pacman: name=sshfs state=present
|
||||
pacman:
|
||||
name: sshfs
|
||||
state: present
|
||||
|
||||
- name: Install autossh
|
||||
pacman: name=autossh state=present
|
||||
pacman:
|
||||
name: autossh
|
||||
state: present
|
||||
|
||||
- name: Copy fuse configuration file
|
||||
copy: src=fuse.conf dest=/etc/fuse.conf
|
||||
copy:
|
||||
src: fuse.conf
|
||||
dest: /etc/fuse.conf
|
||||
|
||||
- name: Install keychain
|
||||
pacman: name=keychain state=present
|
||||
pacman:
|
||||
name: keychain
|
||||
state: present
|
||||
|
||||
- name: Install x11-ask-pass
|
||||
pacman: name=x11-ssh-askpass state=present
|
||||
pacman:
|
||||
name: x11-ssh-askpass
|
||||
state: present
|
||||
|
||||
- name: Export SSH_ASKPASS environment variable
|
||||
lineinfile: dest=/etc/profile
|
||||
state=present
|
||||
line="export SSH_ASKPASS=\"/usr/lib/ssh/x11-ssh-askpass\""
|
||||
lineinfile:
|
||||
dest: /etc/profile
|
||||
state: present
|
||||
line: "export SSH_ASKPASS=\"/usr/lib/ssh/x11-ssh-askpass\""
|
||||
|
||||
- name: Make directory for user SSH key
|
||||
file: path=/home/{{ user.name }}/.ssh state=directory owner={{ user.name }} group={{ user.group }}
|
||||
file:
|
||||
path: /home/{{ user.name }}/.ssh
|
||||
state: directory
|
||||
owner: "{{ user.name }}"
|
||||
group: "{{ user.group }}"
|
||||
|
||||
- name: Install user SSH key
|
||||
copy: src={{ ssh.user_key }} dest=/home/{{ user.name }}/.ssh/id_rsa mode=600 owner={{ user.name }} group={{ user.group }}
|
||||
copy:
|
||||
src: "{{ ssh.user_key }}"
|
||||
dest: /home/{{ user.name }}/.ssh/id_rsa
|
||||
mode: 600
|
||||
owner: "{{ user.name }}"
|
||||
group: "{{ user.group }}"
|
||||
when: ssh.user_key is defined
|
||||
|
||||
- name: Install Mosh
|
||||
pacman: name=mosh state=present
|
||||
pacman:
|
||||
name: mosh
|
||||
state: present
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue