bank: Add some basic tasks
This commit is contained in:
parent
8f3f72098d
commit
644d610567
3 changed files with 39 additions and 0 deletions
29
roles/bank/tasks/main.yaml
Normal file
29
roles/bank/tasks/main.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- tags: bank
|
||||
block:
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name: [ libterm-readline-gnu-perl, libcurses-ui-perl ]
|
||||
state: present
|
||||
|
||||
- name: Add user
|
||||
user:
|
||||
name: bank
|
||||
password: $6$idklol$QrOE/21LDR0vhZBAXwgA7AvnmR6Ju4ZqzAzgeazC08i2yw9kyQjgwu.uuV692iL/cyE7AteDYUxCpcorONXom. # "bank"
|
||||
home: /home/bank
|
||||
shell: /home/bank/revbank.git/revbank
|
||||
update_password: always
|
||||
|
||||
- name: Allow password auth for bank user
|
||||
blockinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
insertafter: EOF
|
||||
block: |-
|
||||
Match User bank
|
||||
PasswordAuthentication yes
|
||||
notify: reload sshd
|
||||
|
||||
- name: Clear motd
|
||||
copy:
|
||||
content: ""
|
||||
dest: /etc/motd
|
Loading…
Add table
Add a link
Reference in a new issue