Install the latest Ansible v2.9.2 without `id_rsa.pub` , `authorized_keys`
4440 단어 Ansibleid_rsa앤서블authorized_keys
Install the latest Ansible version 2.9.2
How to use without
id_rsa.pub
, authorized_keys
🙈Test environment
Install
$ apt-get update
$ apt-get install software-properties-common
$ apt-add-repository --yes --update ppa:ansible/ansible
$ apt-get install ansible
$ ansible --version
ansible 2.9.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 7.4.0]
Modify Ansible Configuration File
Modify both
/etc/ansible/ansible.cfg
and /etc/ansible/hosts
Ref Link$ vi /etc/ansible/ansible.cfg
[defaults]
host_key_checking = False
[ssh_connection]
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
control_path = /dev/shm/cp%%h-%%p-%%r
$ vi /etc/ansible/hosts
[child]
182.252.133.71
182.252.133.72
[child:vars]
ansible_user=root
ansible_password=Password1!
Run
Check the operation with the default 핑 command of ad-hoc .
Once
ping
and pong
are confirmed, you're done! 👌$ ansible child -m ping -i /etc/ansible/hosts
182.252.133.72 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
182.252.133.71 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
Reference
이 문제에 관하여(Install the latest Ansible v2.9.2 without `id_rsa.pub` , `authorized_keys`), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/leechungkyu/items/1b49a970e1facdc38d0a텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)