Skip to content

Instantly share code, notes, and snippets.

@xiaopeng163
Last active August 9, 2019 08:27
Show Gist options
  • Save xiaopeng163/065ad8e1c4c0a5667d1a57406db81bc6 to your computer and use it in GitHub Desktop.
Save xiaopeng163/065ad8e1c4c0a5667d1a57406db81bc6 to your computer and use it in GitHub Desktop.
install ansible on ubuntu1804

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-18-04

penxiao@WPU8L0042502:~$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [465 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [160 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [4296 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2192 B]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [577 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [189 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4008 B]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2060 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [697 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [256 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [7040 B]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [3076 B]
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [983 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [299 kB]
222 packages can be upgraded. Run 'apt list --upgradable' to see them.
penxiao@WPU8L0042502:~$ sudo apt install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-software-properties
The following packages will be upgraded:
  python3-software-properties software-properties-common
2 upgraded, 0 newly installed, 0 to remove and 220 not upgraded.
Need to get 33.8 kB of archives.
After this operation, 13.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 software-properties-common all 0.96.24.32.9 [9992 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-software-properties all 0.96.24.32.9 [23.8 kB]
Fetched 33.8 kB in 0s (233 kB/s)
(Reading database ... 28490 files and directories currently installed.)
Preparing to unpack .../software-properties-common_0.96.24.32.9_all.deb ...
Unpacking software-properties-common (0.96.24.32.9) over (0.96.24.32.4) ...
Preparing to unpack .../python3-software-properties_0.96.24.32.9_all.deb ...
Unpacking python3-software-properties (0.96.24.32.9) over (0.96.24.32.4) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up python3-software-properties (0.96.24.32.9) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up software-properties-common (0.96.24.32.9) ...
penxiao@WPU8L0042502:~$ sudo apt-add-repository ppa:ansible/ansible
 Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.

http://ansible.com/
 More info: https://launchpad.net/~ansible/+archive/ubuntu/ansible
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Get:1 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic InRelease [15.9 kB]
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:6 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic/main amd64 Packages [528 B]
Get:7 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic/main Translation-en [344 B]
Fetched 16.8 kB in 16s (1015 B/s)
Reading package lists... Done
penxiao@WPU8L0042502:~$
penxiao@WPU8L0042502:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
220 packages can be upgraded. Run 'apt list --upgradable' to see them.
penxiao@WPU8L0042502:~$ sudo apt install ansible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment