티스토리 뷰
Ansible 설치 / 우분투 18.04 환경
ansible all -m ping
1. 설치 환경
[그림 1] Ansible 설치를 위한 Node 구성도
- Ubuntu 18.04 LTS 64bit, root user
- Ansible 2.9.27
2. Ansible 설치
apt-get install -y software-properties-common
apt-add-repository -y ppa:ansible/ansible
apt-get update -y
apt-get -y install ansible
3. Inventory 구성 (client ip 는 192.168.56.112 입니다.)
[cluster]
192.168.56.112
ansible-server : /etc/ansible/hosts
4. SSH Key 생성 및 설정
$ssh-keygen -t rsa
root@ansibleserver:/etc/ansible# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:eolMO4/1GhHkvo9K5Ps2mtNn370m0qA+OPI7lWHdMDs root@ansibleserver
The key's randomart image is:
+---[RSA 2048]----+
| . |
| o o |
| o . = |
| . + E . |
| o S o . |
| = + * . |
| O.O . o |
| o.%+Bo. + o |
| OOX*+.o +.o|
+----[SHA256]-----+
Client 서버에 ansiblecli 라는 계정을 생성해봅니다. 패스워드도 설정합니다.
root@ansibleclient:/home/vagrant# adduser ansiblecli
Adding user `ansiblecli' ...
Adding new group `ansiblecli' (1001) ...
Adding new user `ansiblecli' (1001) with group `ansiblecli' ...
Creating home directory `/home/ansiblecli' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for ansiblecli
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
root@ansibleclient:/home/vagrant#
root@ansibleserver:/etc/ansible# ssh-copy-id ansiblecli@192.168.56.112
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
ansiblecli@192.168.56.112's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'ansiblecli@192.168.56.112'"
and check to make sure that only the key(s) you wanted were added.
5. Ansible 구동
6. 참조
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 오라클 홈디렉토리 copy 후 startup 에러
- CVE 취약점 점검
- pod 상태
- 오라클 트러블 슈팅(성능 고도화 원리와 해법!)
- 앤시블
- ubuntu
- ORACLE 트러블 슈팅(성능 고도화 원리와 해법!)
- Oracle
- 오라클
- [오라클 튜닝] instance 튜닝2
- MSA
- 5.4.0.1072
- 버쳐박스
- 키알리
- startup 에러
- 테라폼
- 스토리지 클레스
- [오라클 튜닝] sql 튜닝
- 튜닝
- 설치하기(HP-UX)
- 코로나19
- 커널
- (InstantClient) 설치하기(HP-UX)
- directory copy 후 startup 에러
- 쿠버네티스
- 여러서버 컨트롤
- K8s
- 오라클 인스턴트클라이언트(InstantClient) 설치하기(HP-UX)
- 트리이스
- 우분투
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함