CentOSでWebサイトを構築する勉強用?
参考サイト http://c.itdo.jp/technical-information/ansible/ansible-tutorial/
[root@Kensyo ~]# yum install epel-release -y [root@Kensyo ~]# yum install ansible [root@Kensyo ~]# ansible --version
$ sudo useradd ope01 $ sudo passwd ope01 $ ssh-keygen -t ed25519 -C "" -f ~/.ssh/id_ed25519
$ sudo hostnamectl set-hostname devEnv01
$ cd ~/ $ pwd $ cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
# cd /etc/ansible/ # vi hosts
[target] targetnode ansible_host=192.168.181.103 ←対象サーバののIPアドレスを指定
以下が出力されることを確認
[ope01@devEnv01 ansible]$ ansible all -i hosts -m ping
The authenticity of host '118.27.113.52 (118.27.113.52)' can't be established.
ED25519 key fingerprint is SHA256:wGADdzl/OPuvziOZDLp+HLqeu6gqUV/cDTQx65No1xE.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
targetnode | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}
#visudo
%ope01 ALL=(ALL) ALL
XX is ~
XX discribe is ~
example.
XXX = XX + X
[[kiji-template]] * Name * Contents #contents * What's XX XX is ~ * Discribe XX discribe is ~ example. XXX = XX + X * 1. ** 1.1. *** 1.1.1 + ① ++ ② +++ ③ - ・1 -- ・2 --- ・3 | | |h | | | | | | ----
作成者erion1107