라벨이 ssh인 게시물 표시

vscode remote ssh with out password

이미지
 ## set up local SSH key pair  ## copy ssh key to server [root@localhost vue-element-admin]# vi ~/.ssh/authorized_keys [root@localhost vue-element-admin]# systemctl restart sshd  ## set config file

ansible execute playbook

ansible을 이용한 playbook 실행  1. 환경준비     Centos 7.x 2. edit playbook [root@localhost ~]# vi /etc/ansible/hosts [testgroup] 192.168.0.156 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxx ansible_ssh_common_args='-o StrictHostKeyChecking=no' 192.168.0.116 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxx ansible_ssh_common_args='-o StrictHostKeyChecking=no' 192.168.0.177 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxx ansible_ssh_common_args='-o StrictHostKeyChecking=no' [root@localhost ~]# vi test.yml - hosts: testgroup   tasks:     - script: /usr/bin/date >> /tmp/date.log ~ ~ [root@localhost ~]# ansible-playbook test.yml PLAY [testgroup] ****************************************************************************************************************************** TASK [Gathering Facts] *************************************************************************************