forked from LibreSchool/server-config
Aggiornamento per creazione chiave locale ssh.
This commit is contained in:
parent
ee97aa74d3
commit
f64474fc0f
@ -7,3 +7,7 @@ Per configurarlo:
|
|||||||
$ ansible-playbook firstsetup.yml -u root --ask-pass \
|
$ ansible-playbook firstsetup.yml -u root --ask-pass \
|
||||||
-e "admin_sshkey=/path/to/id_rsa.pub"
|
-e "admin_sshkey=/path/to/id_rsa.pub"
|
||||||
$ ansible-playbook server.yml
|
$ ansible-playbook server.yml
|
||||||
|
|
||||||
|
In alternativa:
|
||||||
|
|
||||||
|
$ bash init.sh
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
inventory=hosts
|
inventory=hosts
|
||||||
|
roles_path=roles
|
||||||
|
2
hosts
2
hosts
@ -1,4 +1,2 @@
|
|||||||
[server]
|
[server]
|
||||||
pdc ansible_ssh_host=10.0.0.1 ansible_ssh_user=amgmt
|
pdc ansible_ssh_host=10.0.0.1 ansible_ssh_user=amgmt
|
||||||
|
|
||||||
[clients]
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
sudo: yes
|
sudo: yes
|
||||||
when: ansible_os_family == 'ClearOS'
|
when: ansible_os_family == 'ClearOS'
|
||||||
with_items:
|
with_items:
|
||||||
|
- git-svn
|
||||||
- vim-enhanced
|
- vim-enhanced
|
||||||
- git
|
|
||||||
- screen
|
- screen
|
||||||
- sshpass
|
- sshpass
|
||||||
- ansible
|
- ansible
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- include: mgmtuser.yml
|
- include: mgmtuser.yml
|
||||||
|
|
||||||
|
- include: ssh-keygen.yml
|
||||||
|
6
roles/firstsetup/tasks/ssh-keygen.yml
Normal file
6
roles/firstsetup/tasks/ssh-keygen.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Gestione creazione chiave ssh
|
||||||
|
shell: ssh-keygen -t rsa -b 1024 -f id_rsa -N ''
|
||||||
|
sudo: yes
|
||||||
|
sudo_user: root
|
Loading…
x
Reference in New Issue
Block a user