Install the latest Ansible v2.9.2 without `id_rsa.pub` , `authorized_keys`
Install the latest Ansible version 2.9.2
How to use withoutid_rsa.pub
,authorized_keys
🙈
Test environment
- Ubuntu 18.04
- Ansible 2.9.2
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 ping 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"
}
Author And Source
この問題について(Install the latest Ansible v2.9.2 without `id_rsa.pub` , `authorized_keys`), 我々は、より多くの情報をここで見つけました https://qiita.com/leechungkyu/items/1b49a970e1facdc38d0a著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .