艾瑞克的 Hexo 空間

筆記-install ansible 2.4 server

install ubuntu 16.04 Server

  1. install with basic configuration

  2. create user administrator and passd XXXX

  3. reboot

basic configuration

  1. change ip /etc/network/interfaces
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# The primary network interface
auto ens18
iface ens18 inet static
address 192.168.11.xx
netmask 255.255.255.0
gateway 192.168.11.253
dns-nameserver 8.8.8.8 4.4.4.4 9.9.9.9 168.95.1.1

reboot

  1. install necessary packages
1
2
sudo apt install build-essential python2.7 git pkg-config
  1. make a hardlink
1
2
sudo ln -s /usr/bin/python2.7 /usr/bin/python
  1. install necessary packages
1
2
sudo apt install libssl-dev libffi-dev python-pip python3-pip
  1. add ansible repository
1
2
3
4
5
6
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
  1. pip install packages for python3
1
2
3
4
sudo pip3 install ansible passlib
sudo pip install passlib

Running ansible from server to update hosts/accounts

1
2
[minion@hqs009 ansible]$ make EXTRA_ARGS="-i inventory/ematters.development --limit hqdc098.ematters.com.tw --tag hosts,bootstrap" eric_account_server
avatar
筆記-能夠看到進度、速度的cp tools cp tools with progress bar

  1. 1. install ubuntu 16.04 Server
  2. 2. basic configuration
  3. 3. Running ansible from server to update hosts/accounts