In [5]:
!ansible -m ping -i inventory 192.168.33.10
192.168.33.10 | success >> {
"changed": false,
"ping": "pong"
}
In [6]:
!ansible -i inventory 192.168.33.10 -a 'cat /etc/lsb-release'
192.168.33.10 | success | rc=0 >>
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"
In [12]:
!ansible -i inventory 192.168.33.10 --sudo -a 'apt-get update'
192.168.33.10 | success | rc=0 >>
Ign http://archive.ubuntu.com trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://archive.ubuntu.com trusty-backports InRelease
Get:2 http://security.ubuntu.com trusty-security Release [62.0 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Get:3 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty-backports Release.gpg
Hit http://archive.ubuntu.com trusty Release
Get:4 http://archive.ubuntu.com trusty-updates Release [62.0 kB]
Get:5 http://security.ubuntu.com trusty-security/main Sources [72.5 kB]
Get:6 http://security.ubuntu.com trusty-security/restricted Sources [2,061 B]
Hit http://archive.ubuntu.com trusty-backports Release
Get:7 http://security.ubuntu.com trusty-security/universe Sources [17.9 kB]
Hit http://archive.ubuntu.com trusty/main Sources
Get:8 http://security.ubuntu.com trusty-security/multiverse Sources [1,905 B]
Hit http://archive.ubuntu.com trusty/restricted Sources
Get:9 http://security.ubuntu.com trusty-security/main amd64 Packages [222 kB]
Hit http://archive.ubuntu.com trusty/universe Sources
Hit http://archive.ubuntu.com trusty/multiverse Sources
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Get:10 http://security.ubuntu.com trusty-security/restricted amd64 Packages [8,875 B]
Hit http://archive.ubuntu.com trusty/main i386 Packages
Get:11 http://security.ubuntu.com trusty-security/universe amd64 Packages [88.1 kB]
Hit http://archive.ubuntu.com trusty/restricted i386 Packages
Get:12 http://security.ubuntu.com trusty-security/multiverse amd64 Packages [3,459 B]
Hit http://archive.ubuntu.com trusty/universe i386 Packages
Hit http://archive.ubuntu.com trusty/multiverse i386 Packages
Get:13 http://security.ubuntu.com trusty-security/main i386 Packages [212 kB]
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Get:14 http://security.ubuntu.com trusty-security/restricted i386 Packages [8,846 B]
Get:15 http://archive.ubuntu.com trusty-updates/main Sources [184 kB]
Get:16 http://security.ubuntu.com trusty-security/universe i386 Packages [88.1 kB]
Get:17 http://archive.ubuntu.com trusty-updates/restricted Sources [2,564 B]
Get:18 http://archive.ubuntu.com trusty-updates/universe Sources [107 kB]
Get:19 http://security.ubuntu.com trusty-security/multiverse i386 Packages [3,628 B]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:20 http://archive.ubuntu.com trusty-updates/multiverse Sources [4,484 B]
Get:21 http://archive.ubuntu.com trusty-updates/main amd64 Packages [454 kB]
Get:22 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [9,238 B]
Get:23 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [259 kB]
Get:24 http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages [11.2 kB]
Get:25 http://archive.ubuntu.com trusty-updates/main i386 Packages [444 kB]
Get:26 http://archive.ubuntu.com trusty-updates/restricted i386 Packages [9,256 B]
Get:27 http://archive.ubuntu.com trusty-updates/universe i386 Packages [260 kB]
Get:28 http://archive.ubuntu.com trusty-updates/multiverse i386 Packages [11.3 kB]
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty-backports/main Sources
Hit http://archive.ubuntu.com trusty-backports/restricted Sources
Hit http://archive.ubuntu.com trusty-backports/universe Sources
Hit http://archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty-backports/main Translation-en
Hit http://archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://archive.ubuntu.com trusty-backports/universe Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Fetched 2,610 kB in 27s (96.5 kB/s)
Reading package lists...
In [ ]:
Content source: doragon/presentation
Similar notebooks: