Hay otras forma de hacer lo mismo en Windows 10, y de paso experimentar con Ubuntu usando el Windows Subsystem for Linux (WSL).
En realidad es el objetivo de este post, usando como excusa algo que ya conocemos un poco y nos interesa seguir aprendiendo.
Voy a usar el repositorio vagrant-builder de Frits Hoogland, que tiene documentado el uso de diferentes versiones de OS y BD, incluyendo la que me interesaba probar: OEL 6.9 y 11.2.0.4.0.
Podría usar el mismo repositorio que antes, de oravirt, pero es interesante probar este uso de vagrant que no usa ansible_local, por lo que no funciona en Windows.
Hace unos días Oracle hizo público su propio repositorio Vagrant, incluyendo dos configuraciones: 12.2.0.1 y XE 11.2.0.2.
También es un buen candidato a probar, aunque sea una versión distinta a la que me interesa usar ahora.
Pero esta prueba ya la tengo en draft desde hace algunas semanas y casi pronta para publicar, así que ese queda para otro post.
Durante esta prueba encontré varios problemas que los incluyo en otro post (parte 2) para mantener éste lo más simple posible.
Sólo voy a mencionar acá las soluciones a errores que no evité de forma definitiva.
O sea, los que corregí a mano para poder continuar, pero que se van a repetir si arrancamos el proceso desde el principio.
Ubuntu en Windows 10
Esta funcionalidad es para desarrolladores y todavía en beta.
Algo interesante es que los programas que ejecutamos desde la consola Ubuntu en Windows no usa los binarios que ya tenemos instalados en Windows, sino que tenemos que instalar nuevos binarios para ubuntu, aunque tengamos el mismo programa funcionando en Windows.
Por más detalles de porqué esto es así, ver este link.
Yo seguí la documentación de Microsoft para habiliar WSL, usando la opción de Microsoft Store.
Todo funcionó como tal como se describe en esa guía sin problemas.
Una vez instalado, al abrir una consola Ubuntu por primera vez, se completa la instalación (botón launch como se describe arriba, o buscar "ubuntu" en el menú de inicio de Windows):
Installing, this may take a few minutes...
Installation successful!
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: ncalero
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Default UNIX user set to: ncalero
To run a command as administrator (user "root"), use "sudo".
See "man sudo_root" for details.
Como ven se pide crear un usuario unix. Yo creé ncalero.
Instalar Ansible en Ubuntu WSL
Para instalar Ansible se tienen que hacer unos pasos extras. Yo seguí esta guía.
Si no se ejecuta primero 'apt-get update' como se describe, vamos a tener este error:
ncalero@H6RMYZ1:~$ sudo apt-get -y install python-pip python-dev libffi-dev libssl-dev
[sudo] password for ncalero:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
Este es el detalle de ejecutar esos pasos.
Hice una pequeña variante instalando primero un solo paquete (python-dev) para confirmar que funcione como se espera, y después el resto:
ncalero@H6RMYZ1:~$ sudo su -
root@H6RMYZ1:~# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [425 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [186 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7224 B]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2152 B]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [196 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [101 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3208 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1408 B]
Get:14 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [700 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [292 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7624 B]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2272 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [574 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [232 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8052 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4840 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3220 B]
Get:27 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6612 B]
Get:28 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3768 B]
Fetched 15.2 MB in 56s (268 kB/s)
Reading package lists... Done
root@H6RMYZ1:~#
root@H6RMYZ1:~# apt-get install python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libfreetype6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libc-dev-bin libc6 libc6-dev libexpat1-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev
libpython2.7-minimal libpython2.7-stdlib linux-libc-dev manpages-dev python python-minimal python2.7 python2.7-dev
python2.7-minimal
Suggested packages:
glibc-doc python-doc python-tk python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
libc-dev-bin libc6-dev libexpat1-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev
libpython2.7-minimal libpython2.7-stdlib linux-libc-dev manpages-dev python python-dev python-minimal python2.7
python2.7-dev python2.7-minimal
The following packages will be upgraded:
libc6
1 upgraded, 17 newly installed, 0 to remove and 82 not upgraded.
Need to get 38.4 MB/40.8 MB of archives.
After this operation, 84.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [340 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [1261 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6 amd64 2.23-0ubuntu10 [2580 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.3 [1880 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.3 [224 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-dev-bin amd64 2.23-0ubuntu10 [68.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-109.132 [829 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6-dev amd64 2.23-0ubuntu10 [2079 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.3 [1070 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [27.8 MB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [276 kB]
Fetched 38.4 MB in 2min 39s (240 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 25532 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../python-minimal_2.7.11-1_amd64.deb ...
Unpacking python-minimal (2.7.11-1) ...
Preparing to unpack .../libc6_2.23-0ubuntu10_amd64.deb ...
Unpacking libc6:amd64 (2.23-0ubuntu10) over (2.23-0ubuntu9) ...
Setting up libc6:amd64 (2.23-0ubuntu10) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
(Reading database ... 25769 files and directories currently installed.)
Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../libpython-stdlib_2.7.11-1_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.11-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.11-1) ...
Selecting previously unselected package python.
(Reading database ... 26278 files and directories currently installed.)
Preparing to unpack .../python_2.7.11-1_amd64.deb ...
Unpacking python (2.7.11-1) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../libc-dev-bin_2.23-0ubuntu10_amd64.deb ...
Unpacking libc-dev-bin (2.23-0ubuntu10) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../linux-libc-dev_4.4.0-109.132_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-109.132) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../libc6-dev_2.23-0ubuntu10_amd64.deb ...
Unpacking libc6-dev:amd64 (2.23-0ubuntu10) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Selecting previously unselected package libpython2.7:amd64.
Preparing to unpack .../libpython2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack .../libpython2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../libpython-dev_2.7.11-1_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.11-1) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../manpages-dev_4.04-2_all.deb ...
Unpacking manpages-dev (4.04-2) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../python2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../python-dev_2.7.11-1_amd64.deb ...
Unpacking python-dev (2.7.11-1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up python2.7 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython-stdlib:amd64 (2.7.11-1) ...
Setting up python (2.7.11-1) ...
Setting up libc-dev-bin (2.23-0ubuntu10) ...
Setting up linux-libc-dev:amd64 (4.4.0-109.132) ...
Setting up libc6-dev:amd64 (2.23-0ubuntu10) ...
Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Setting up libpython2.7:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython-dev:amd64 (2.7.11-1) ...
Setting up manpages-dev (4.04-2) ...
Setting up python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...
Setting up python-dev (2.7.11-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
root@H6RMYZ1:~# apt-get -y install python-pip libffi-dev libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libfreetype6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 gcc-5-base libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1 libcc1-0 libcilkrts5 libdpkg-perl libfakeroot
libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-all-dev
libquadmath0 libssl-doc libssl1.0.0 libstdc++-5-dev libstdc++6 libtsan0 libubsan0 make python-all python-all-dev
python-pip-whl python-pkg-resources python-setuptools python-wheel zlib1g-dev
Suggested packages:
binutils-doc cpp-doc gcc-5-locales debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg
gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg
libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg
libstdc++-5-doc make-doc python-setuptools-doc
The following NEW packages will be installed:
binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1 libcc1-0 libcilkrts5 libdpkg-perl libfakeroot
libffi-dev libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-all-dev
libquadmath0 libssl-dev libssl-doc libstdc++-5-dev libtsan0 libubsan0 make python-all python-all-dev python-pip
python-pip-whl python-pkg-resources python-setuptools python-wheel zlib1g-dev
The following packages will be upgraded:
gcc-5-base libssl1.0.0 libstdc++6
3 upgraded, 44 newly installed, 0 to remove and 79 not upgraded.
Need to get 39.4 MB of archives.
After this operation, 135 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libmpc3 amd64 1.0.3-1 [39.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.5 [17.1 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++6 amd64 5.4.0-6ubuntu1~16.04.5 [393 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu4.10 [1083 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.6 [2311 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 libisl15 amd64 0.16.1-1 [524 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.5 [7786 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 cpp amd64 4:5.3.1-1ubuntu1 [27.7 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.5 [38.8 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.5 [55.1 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.5 [27.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.5 [8920 B]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.5 [264 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.5 [105 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.5 [244 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.5 [95.3 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.5 [40.1 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.5 [9786 B]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.5 [131 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [2226 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.5 [8638 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 gcc amd64 4:5.3.1-1ubuntu1 [5244 B]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [1430 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.5 [8435 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.3 [195 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.3 [584 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]
Get:30 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfakeroot amd64 1.20.2-1ubuntu1 [25.5 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial/main amd64 fakeroot amd64 1.20.2-1ubuntu1 [61.8 kB]
Get:32 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
Get:33 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
Get:34 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
Get:35 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfile-fcntllock-perl amd64 0.22-3 [32.0 kB]
Get:36 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpython-all-dev amd64 2.7.11-1 [992 B]
Get:37 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.1 [168 kB]
Get:38 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.10 [1341 kB]
Get:39 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.10 [1079 kB]
Get:40 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-all amd64 2.7.11-1 [978 B]
Get:41 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-all-dev amd64 2.7.11-1 [1000 B]
Get:42 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip-whl all 8.1.1-2ubuntu0.4 [1110 kB]
Get:43 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip all 8.1.1-2ubuntu0.4 [144 kB]
Get:44 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-pkg-resources all 20.7.0-1 [108 kB]
Get:45 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-setuptools all 20.7.0-1 [169 kB]
Get:46 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python-wheel all 0.29.0-1 [48.0 kB]
Get:47 http://archive.ubuntu.com/ubuntu xenial/main amd64 libffi-dev amd64 3.2.1-4 [161 kB]
Fetched 39.4 MB in 3min 18s (198 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package libmpc3:amd64.
(Reading database ... 29867 files and directories currently installed.)
Preparing to unpack .../libmpc3_1.0.3-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.0.3-1) ...
Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.5) over (5.4.0-6ubuntu1~16.04.4) ...
Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.5) ...
(Reading database ... 29872 files and directories currently installed.)
Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.5) over (5.4.0-6ubuntu1~16.04.4) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
(Reading database ... 29872 files and directories currently installed.)
Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.10_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.10) over (1.0.2g-1ubuntu4.8) ...
Selecting previously unselected package binutils.
Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.6_amd64.deb ...
Unpacking binutils (2.26.1-1ubuntu1~16.04.6) ...
Selecting previously unselected package libisl15:amd64.
Preparing to unpack .../libisl15_0.16.1-1_amd64.deb ...
Unpacking libisl15:amd64 (0.16.1-1) ...
Selecting previously unselected package cpp-5.
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package cpp.
Preparing to unpack .../cpp_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking cpp (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libasan2:amd64.
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libubsan0:amd64.
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libcilkrts5:amd64.
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libmpx0:amd64.
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package libgcc-5-dev:amd64.
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package gcc-5.
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package gcc.
Preparing to unpack .../gcc_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking gcc (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libstdc++-5-dev:amd64.
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package g++-5.
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.5) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking g++ (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package make.
Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Unpacking make (4.1-6) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.3_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.3) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.3_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.3) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../libfakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking fakeroot (1.20.2-1ubuntu1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../libalgorithm-diff-perl_1.19.03-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-4build1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-4build1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-3_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3) ...
Selecting previously unselected package libpython-all-dev:amd64.
Preparing to unpack .../libpython-all-dev_2.7.11-1_amd64.deb ...
Unpacking libpython-all-dev:amd64 (2.7.11-1) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.10_amd64.deb ...
Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.10) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.2g-1ubuntu4.10_all.deb ...
Unpacking libssl-doc (1.0.2g-1ubuntu4.10) ...
Selecting previously unselected package python-all.
Preparing to unpack .../python-all_2.7.11-1_amd64.deb ...
Unpacking python-all (2.7.11-1) ...
Selecting previously unselected package python-all-dev.
Preparing to unpack .../python-all-dev_2.7.11-1_amd64.deb ...
Unpacking python-all-dev (2.7.11-1) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../python-pip-whl_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip-whl (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python-pkg-resources.
Preparing to unpack .../python-pkg-resources_20.7.0-1_all.deb ...
Unpacking python-pkg-resources (20.7.0-1) ...
Selecting previously unselected package python-setuptools.
Preparing to unpack .../python-setuptools_20.7.0-1_all.deb ...
Unpacking python-setuptools (20.7.0-1) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../python-wheel_0.29.0-1_all.deb ...
Unpacking python-wheel (0.29.0-1) ...
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack .../libffi-dev_3.2.1-4_amd64.deb ...
Unpacking libffi-dev:amd64 (3.2.1-4) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up libmpc3:amd64 (1.0.3-1) ...
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.10) ...
Setting up binutils (2.26.1-1ubuntu1~16.04.6) ...
Setting up libisl15:amd64 (0.16.1-1) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.5) ...
Setting up cpp (4:5.3.1-1ubuntu1) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.5) ...
Setting up gcc (4:5.3.1-1ubuntu1) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.5) ...
Setting up g++ (4:5.3.1-1ubuntu1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up make (4.1-6) ...
Setting up libdpkg-perl (1.18.4ubuntu1.3) ...
Setting up dpkg-dev (1.18.4ubuntu1.3) ...
Setting up build-essential (12.1ubuntu2) ...
Setting up libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Setting up fakeroot (1.20.2-1ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libalgorithm-diff-perl (1.19.03-1) ...
Setting up libalgorithm-diff-xs-perl (0.04-4build1) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libfile-fcntllock-perl (0.22-3) ...
Setting up libpython-all-dev:amd64 (2.7.11-1) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.10) ...
Setting up libssl-doc (1.0.2g-1ubuntu4.10) ...
Setting up python-all (2.7.11-1) ...
Setting up python-all-dev (2.7.11-1) ...
Setting up python-pip-whl (8.1.1-2ubuntu0.4) ...
Setting up python-pip (8.1.1-2ubuntu0.4) ...
Setting up python-pkg-resources (20.7.0-1) ...
Setting up python-setuptools (20.7.0-1) ...
Setting up python-wheel (0.29.0-1) ...
Setting up libffi-dev:amd64 (3.2.1-4) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
El último paso es instalar Ansible:
ncalero@H6RMYZ1:~$ pip install ansible --user
Collecting ansible
Downloading ansible-2.4.2.0.tar.gz (6.5MB)
100% |################################| 6.5MB 156kB/s
Collecting jinja2 (from ansible)
Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |################################| 133kB 1.7MB/s
Collecting PyYAML (from ansible)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |################################| 256kB 2.3MB/s
Collecting paramiko (from ansible)
Downloading paramiko-2.4.0-py2.py3-none-any.whl (192kB)
100% |################################| 194kB 2.6MB/s
Collecting cryptography (from ansible)
Downloading cryptography-2.1.4-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)
100% |################################| 2.2MB 335kB/s
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from ansible)
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
Downloading MarkupSafe-1.0.tar.gz
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)
100% |################################| 71kB 1.6MB/s
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
Downloading bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl (57kB)
100% |################################| 61kB 2.4MB/s
Collecting pynacl>=1.0.1 (from paramiko->ansible)
Downloading PyNaCl-1.2.1-cp27-cp27mu-manylinux1_x86_64.whl (696kB)
100% |################################| 706kB 920kB/s
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible)
Downloading cffi-1.11.4-cp27-cp27mu-manylinux1_x86_64.whl (406kB)
100% |################################| 409kB 1.3MB/s
Collecting enum34; python_version < "3" (from cryptography->ansible)
Downloading enum34-1.1.6-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography->ansible)
Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
100% |################################| 102kB 2.2MB/s
Collecting idna>=2.1 (from cryptography->ansible)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |################################| 61kB 2.1MB/s
Collecting six>=1.4.1 (from cryptography->ansible)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography->ansible)
Downloading ipaddress-1.0.19.tar.gz
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)
Downloading pycparser-2.18.tar.gz (245kB)
100% |################################| 256kB 1.7MB/s
Building wheels for collected packages: ansible, PyYAML, MarkupSafe, ipaddress, pycparser
Running setup.py bdist_wheel for ansible ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/82/72/89/bcdf63814af976426a34174577b5775d8604b268b1b21fdc1a
Running setup.py bdist_wheel for PyYAML ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc
Running setup.py bdist_wheel for MarkupSafe ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Running setup.py bdist_wheel for ipaddress ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/d7/6b/69/666188e8101897abb2e115d408d139a372bdf6bfa7abb5aef5
Running setup.py bdist_wheel for pycparser ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/95/14/9a/5e7b9024459d2a6600aaa64e0ba485325aff7a9ac7489db1b6
Successfully built ansible PyYAML MarkupSafe ipaddress pycparser
Installing collected packages: MarkupSafe, jinja2, PyYAML, pyasn1, six, pycparser, cffi, bcrypt, enum34, asn1crypto, idna, ipaddress, cryptography, pynacl, paramiko, ansible
Successfully installed MarkupSafe PyYAML ansible asn1crypto bcrypt cffi cryptography enum34 idna ipaddress jinja2 paramiko pyasn1 pycparser pynacl six
python: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed.
Aborted (core dumped)
Este error es conocido y descrito acá.
Se resuelve deshabilitando IPv6 en apt-get como root:
root@H6RMYZ1:~# vi /etc/apt/apt.conf.d/99force-ipv4
root@H6RMYZ1:~# cat /etc/apt/apt.conf.d/99force-ipv4
Acquire::ForceIPv4 "true";
root@H6RMYZ1:~# exit
ncalero@H6RMYZ1:~$ pip install ansible --user
Collecting ansible
Downloading ansible-2.4.2.0.tar.gz (6.5MB)
100% |################################| 6.5MB 133kB/s
Collecting jinja2 (from ansible)
Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |################################| 133kB 1.2MB/s
Collecting PyYAML (from ansible)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |################################| 256kB 3.9MB/s
Collecting paramiko (from ansible)
Downloading paramiko-2.4.0-py2.py3-none-any.whl (192kB)
100% |################################| 194kB 817kB/s
Collecting cryptography (from ansible)
Downloading cryptography-2.1.4-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)
100% |################################| 2.2MB 493kB/s
Collecting setuptools (from ansible)
Downloading setuptools-38.4.0-py2.py3-none-any.whl (489kB)
100% |################################| 491kB 2.7MB/s
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
Downloading MarkupSafe-1.0.tar.gz
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)
100% |################################| 71kB 1.1MB/s
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
Downloading bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl (57kB)
100% |################################| 61kB 1.3MB/s
Collecting pynacl>=1.0.1 (from paramiko->ansible)
Downloading PyNaCl-1.2.1-cp27-cp27mu-manylinux1_x86_64.whl (696kB)
100% |################################| 706kB 1.6MB/s
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible)
Downloading cffi-1.11.4-cp27-cp27mu-manylinux1_x86_64.whl (406kB)
100% |################################| 409kB 3.1MB/s
Collecting enum34; python_version < "3" (from cryptography->ansible)
Downloading enum34-1.1.6-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography->ansible)
Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
100% |################################| 102kB 3.2MB/s
Collecting idna>=2.1 (from cryptography->ansible)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |################################| 61kB 1.1MB/s
Collecting six>=1.4.1 (from cryptography->ansible)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography->ansible)
Downloading ipaddress-1.0.19.tar.gz
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)
Downloading pycparser-2.18.tar.gz (245kB)
100% |################################| 256kB 3.6MB/s
Building wheels for collected packages: ansible, PyYAML, MarkupSafe, ipaddress, pycparser
Running setup.py bdist_wheel for ansible ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/82/72/89/bcdf63814af976426a34174577b5775d8604b268b1b21fdc1a
Running setup.py bdist_wheel for PyYAML ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc
Running setup.py bdist_wheel for MarkupSafe ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Running setup.py bdist_wheel for ipaddress ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/d7/6b/69/666188e8101897abb2e115d408d139a372bdf6bfa7abb5aef5
Running setup.py bdist_wheel for pycparser ... done
Stored in directory: /home/ncalero/.cache/pip/wheels/95/14/9a/5e7b9024459d2a6600aaa64e0ba485325aff7a9ac7489db1b6
Successfully built ansible PyYAML MarkupSafe ipaddress pycparser
Installing collected packages: MarkupSafe, jinja2, PyYAML, pyasn1, six, pycparser, cffi, bcrypt, enum34, asn1crypto, idna, ipaddress, cryptography, pynacl, paramiko, setuptools, ansible
Successfully installed MarkupSafe PyYAML ansible asn1crypto bcrypt cffi cryptography enum34 idna ipaddress jinja2 paramiko pyasn1 pycparser pynacl setuptools-20.7.0 six
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Esta vez se instaló sin problemas.
Para completar la configuración de Ansible sólo falta ajustar el path por defecto de nuestro usuario, para que incluya el directorio donde lo instalamos:
ncalero@H6RMYZ1:~$ ansible --version
ansible 2.4.2.0
config file = None
configured module search path = [u'/home/ncalero/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/ncalero/.local/lib/python2.7/site-packages/ansible
executable location = /home/ncalero/.local/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
ncalero@H6RMYZ1:~$ which ansible
/home/ncalero/.local/bin/ansible
ncalero@H6RMYZ1:~$ echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
Instalar Vagrant
Vagrant soporta usar WLS, también en estado de prueba (alpha).
Aquí se explica cómo habilitarlo https://www.vagrantup.com/docs/other/wsl.html
Vagrant no viene instalado por defecto:
ncalero@H6RMYZ1:~$ vagrant up
The program 'vagrant' is currently not installed. You can install it by typing:
sudo apt install vagrant
Bajé la última versión disponible tal como se describe, que en mi caso fue el archivo vagrant_2.0.1_x86_64.deb, al direcotrio d:\vagrant.d y lo instalé desde la consola Ubuntu:
ncalero@H6RMYZ1:~$ cd /mnt/d/vagrant.d/
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ ls
boxes data gems insecure_private_key rgloader setup_version tmp vagrant_2.0.1_x86_64.deb
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ sudo dpkg -i vagrant_2.0.1_x86_64.deb
Selecting previously unselected package vagrant.
(Reading database ... 34983 files and directories currently installed.)
Preparing to unpack vagrant_2.0.1_x86_64.deb ...
Unpacking vagrant (1:2.0.1) ...
Setting up vagrant (1:2.0.1) ...
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ which vagrant
/usr/bin/vagrant
Para VirtualBox podríamos pensar en seguir el mismo camino, pero, esto es importante: no es necesario.
Vagrant va a usar lo que tenemos instalado en Windows, tal como lo aclara la documentación:
when using the VirtualBox provider Vagrant will interact with VirtualBox installed on the Windows system, not within the WSL. It is important to ensure that any required Windows executable is available within your PATH to allow Vagrant to access them.
Ahora sí, todo pronto para continuar.
Sólo tenemos que ajustar variables de ambiente antes de usarlo:
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export VAGRANT_WSL_WINDOWS_ACCESS_USER="calero"
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export PATH=/home/ncalero/bin:/home/ncalero/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Users/calero/AppData/Local/Microsoft/WindowsApps:/snap/bin:/mnt/c/Program\ Files/Oracle/VirtualBox
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="/mnt/d/GitHub/vargant-builder"
Usando vagrant-builder
Lo primero es clonar el repositorio que vamos a usar:
ncalero@H6RMYZ1:/mnt/d/vagrant.d$ cd /mnt/d/GitHub
ncalero@H6RMYZ1:/mnt/d/GitHub$ git clone --recursive https://gitlab.com/FritsHoogland/vagrant-builder.git
Cloning into 'vagrant-builder'...
remote: Counting objects: 432, done.
remote: Compressing objects: 100% (181/181), done.
remote: Total 432 (delta 228), reused 392 (delta 196)
Receiving objects: 100% (432/432), 80.85 KiB | 0 bytes/s, done.
Resolving deltas: 100% (228/228), done.
Checking connectivity... done.
ncalero@H6RMYZ1:/mnt/d/GitHub$ ls
vagrant-builder
Para usar este repositorio conviene revisar este blog post donde se explica cómo configurarlo.
Bajé de OTN los binarios que necesitamos para instalar Oracle y los dejé en el directorio D:\GitHub\vagrant-builder\ansible\files, así me evito problemas de conectividad durante la ejecución de vagrant (si no están se conecta y los baja):
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder/ansible/files$ ls -lrt
total 3664896
-rwxrwxrwx 1 root root 1395582860 Jan 20 19:07 p13390677_112040_Linux-x86-64_1of7.zip
-rwxrwxrwx 1 root root 1151304589 Jan 20 19:07 p13390677_112040_Linux-x86-64_2of7.zip
-rwxrwxrwx 1 root root 1205251894 Jan 20 19:08 p13390677_112040_Linux-x86-64_3of7.zip
-rwxrwxrwx 1 root root 1069 Jan 21 13:38 ocm.rsp
-rwxrwxrwx 1 root root 6633 Jan 21 13:38 getMOSPatch.sh
Modificamos el archivo Vagrantfile para habilitar solo las versiones que queremos usar:
linux = "bento/oracle-6.9"
vm_cpus = "2"
vm_memory = "4096"
vm_hostname = "oracle-OEL69"
kernel = "kernel-2.6.32-696.el6"
asm_version="11.2.0.4.0"
database_version="11.2.0.4.0"
Ahora ejecutamos vagrant para que haga todo el trabajo:
ncalero@H6RMYZ1:/mnt/d/GitHub$ cd vagrant-builder/
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'bento/oracle-6.9' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'bento/oracle-6.9'
default: URL: https://vagrantcloud.com/bento/oracle-6.9
==> default: Adding box 'bento/oracle-6.9' (v201801.02.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/bento/boxes/oracle-6.9/versions/201801.02.0/providers/virtualbox.box
==> default: Successfully added box 'bento/oracle-6.9' (v201801.02.0) for 'virtualbox'!
==> default: Importing base box 'bento/oracle-6.9'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/oracle-6.9' is up to date...
==> default: Setting the name of the VM: oracle-OEL69
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.4.2.0).
Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
default: Running ansible-playbook...
..
Como se ve en el log anterior, se descargó la VM para el OS que indicamos (OEL 6.9, bento/oracle-6.9).
Es un archivo de 646Mb, tenerlo en cuenta en función de la conexión a internet que usemos.
Despues de muchos pasos y un log bastante largo, me retornó este error:
...
"msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"
}
to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry
PLAY RECAP *********************************************************************
default : ok=11 changed=1 unreachable=0 failed=1
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
El mensaje es claro.
En realidad, SElinux debería deshabilitarse para nuestras VMs de prueba.
Para validar como está configurada, necesitamos conectarnos a la VM.
Podemos hacerlo por Virtualbox o usando ssh en nuestra terminal.
La forma simple de usar ssh desde vagrant no está configurada para nuestra nueva VM:
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant ssh oracle-OEL69
The machine with the name 'oracle-OEL69' was not found configured for
this Vagrant environment.
En el log de la ejecución anterior podemos ver los comandos ssh que se usaron para ejecutar los pasos de vagrant. Copiando el comando ssh de ahí me pude conectar. Éste es el comando:
ssh -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2222 -o 'IdentityFile="/mnt/d/GitHub/vargant-builder/.vagrant.d/insecure_private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/ncalero/.ansible/cp/055b8f4af0 127.0.0.1
Una vez dentro de la VM podemos ver que selinux no está deshabiltado:
[root@oracle-OEL69 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@oracle-OEL69 ~]#
La solución simple para no cambiar la configuración y reiniciar la VM, es instalar la bilioteca que fue reportada en el error:
[root@oracle-OEL69 ~]# yum install libselinux-python
Loaded plugins: ulninfo
Setting up Install Process
public_ol6_UEKR4 | 1.2 kB 00:00
public_ol6_UEKR4/primary | 27 MB 00:06
public_ol6_UEKR4: [################################################## ] 308/560debug2: channel 2: window 999359 sent adjust 49217
public_ol6_UEKR4 560/560
public_ol6_latest | 1.4 kB 00:00
public_ol6_latest/primary | 67 MB 00:16
public_ol6_latest: [ ] 105/39733debug2: channel 2: window 999317 sent adjust 49259
...
public_ol6_latest: [##################################################################################### ] 39493/39733debug2: channel 2: window 999376 sent adjust 49200
public_ol6_latest 39733/39733
Resolving Dependencies
--> Running transaction check
---> Package libselinux-python.x86_64 0:2.0.94-7.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================
Package Arch Version Repository Size
========================================================================================================================
Installing:
libselinux-python x86_64 2.0.94-7.el6 public_ol6_latest 202 k
Transaction Summary
========================================================================================================================
Install 1 Package(s)
Total download size: 202 k
Installed size: 657 k
Is this ok [y/N]: y
Downloading Packages:
libselinux-python-2.0.94-7.el6.x86_64.rpm | 202 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libselinux-python-2.0.94-7.el6.x86_64 1/1
Verifying : libselinux-python-2.0.94-7.el6.x86_64 1/1
Installed:
libselinux-python.x86_64 0:2.0.94-7.el6
Complete!
Para evitar errores si estamos haciendo esta instalación por primera vez, tenemos que configurar las claves ssh de nuestro usuario antes de continuar:
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ssh-keygen -q -N "" -f id_rsa
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ls -lrt ~/.ssh/
total 0
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ncalero/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ncalero/.ssh/id_rsa.
Your public key has been saved in /home/ncalero/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:KR9wXcoPa1yZGG1Xze/iElHjErQgEeTM0C2pk0+BYB0 ncalero@H6RMYZ1
The key's randomart image is:
+---[RSA 2048]----+
| ooE===ooo oo|
| . o==+.*+++ o|
| .o=o*.== ..|
| +o.o =o . .|
| .+S + .o . |
| o.o . . .|
| . o . |
| . . |
| . |
+----[SHA256]-----+
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ls -lrt ~/.ssh/
total 4
-rw------- 1 ncalero ncalero 1675 Jan 21 18:53 id_rsa
-rw-r--r-- 1 ncalero ncalero 397 Jan 21 18:53 id_rsa.pub
Ahora podemos intentar ejecutar los pasos de provision nuevamente:
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant provision
==> default: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.4.2.0).
Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
default: Running ansible-playbook...
PLAY [all] *********************************************************************
TASK [install simplejson if needed] ********************************************
changed: [default]
PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [default]
...
TASK [install_grid_sw : copy files available local in files directory] *********
failed: [default] (item=p13390677_112040_Linux-x86-64_3of7.zip) => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/bin/ssh -S none -i /mnt/d/GitHub/vargant-builder/.vagrant.d/insecure_private_key -o Port=2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null --rsync-path=sudo rsync --out-format=<>%i %n%L /mnt/d/GitHub/vagrant-builder/ansible/files/p13390677_112040_Linux-x86-64_3of7.zip vagrant@127.0.0.1:/u01/install", "item": {"changed": false, "failed": false, "invocation": {"module_args": {"checksum_algorithm": "sha1", "follow": false, "get_attributes": true, "get_checksum": false, "get_md5": false, "get_mime": true, "path": "files/p13390677_112040_Linux-x86-64_3of7.zip"}}, "item": {"file": "p13390677_112040_Linux-x86-64_3of7.zip", "number": "3", "unique_file": "grid"}, "stat": {"atime": 1516486134.0, "attr_flags": "", "attributes": [], "block_size": 512, "blocks": 2354176, "charset": "binary", "ctime": 1516486134.0, "dev": 13, "device_type": 0, "executable": true, "exists": true, "gid": 0, "gr_name": "root", "inode": 568223859040, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "application/zip", "mode": "0777", "mtime": 1516486134.0, "nlink": 1, "path": "files/p13390677_112040_Linux-x86-64_3of7.zip", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 1205251894, "uid": 0, "version": null, "wgrp": true, "woth": true, "writeable": true, "wusr": true, "xgrp": true, "xoth": true, "xusr": true}}, "msg": "Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.\r\nsudo: rsync: command not found\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]\n", "rc": 12}
to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry
PLAY RECAP *********************************************************************
default : ok=60 changed=31 unreachable=0 failed=1
Después de validar que rsync está instalado en ambos lados (local y la VM), la forma simple de evitar el error (que podría estar vinculado al uso de recursos, es Windows!), es usar copy en vez de rsync.
Claro que eso implica que cada nueva ejecución estaría repitiendo algo innecesario, y lo mejor sería tener un directorio compartido para ahorrar espacio en la VM.
Pero para seguir una solución simple, cambié el código del playbook main.yml (vagrant-builder\ansible\roles\install_grid_sw\tasks\main.yml) para que use el comando copy en vez de rsync (línea 42):
- name: copy files available local in files directory
# synchronize: src=files/{{ item.item.file }} dest={{ stage_directory }}
copy: src={{ item.item.file }} dest={{ stage_directory }} owner=oracle group=oinstall mode=0700
Al intentar de nuevo 'vagrant provision', este paso se ejecuta bien, pero hay otro fallo más adelante:
...
TASK [install_grid_sw : copy files available local in files directory] *********
changed: [default] => (item=p13390677_112040_Linux-x86-64_3of7.zip)
TASK [install_grid_sw : set ownership of transferred files] ********************
ok: [default] => (item=p13390677_112040_Linux-x86-64_3of7.zip)
...
TASK [install_opatch : download opatch version 11.2] ***************************
fatal: [default]: FAILED! => {"changed": true, "cmd": "./getMOSPatch.sh patch=6880880", "delta": "0:00:00.006562", "end": "2018-01-21 22:48:43.904304", "msg": "non-zero return code", "rc": 2, "start": "2018-01-21 22:48:43.897742", "stderr": "./getMOSPatch.sh: line 9: \r: command not found\n./getMOSPatch.sh: line 11: set: -\r: invalid option\nset: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]", "stderr_lines": ["./getMOSPatch.sh: line 9: ", ": command not found", "./getMOSPatch.sh: line 11: set: -", ": invalid option", "set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry
PLAY RECAP *********************************************************************
default : ok=84 changed=39 unreachable=0 failed=1
El archivo que da error (getMOSPatch.sh) viene includo en el repositorio:
ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ find . | grep getMOSPatch.sh
./ansible/files/getMOSPatch.sh
Validando la versión copiada a la VM, vemos que da errores al ejecutarlo manualmente:
[vagrant@oracle-OEL69 ~]$ cd /u01/install/
[vagrant@oracle-OEL69 install]$ ls -lrt
total 8
-rwx------. 1 oracle oinstall 6633 Jan 21 22:48 getMOSPatch.sh
[vagrant@oracle-OEL69 install]$ su - oracle
Password:
[oracle@oracle-OEL69 ~]$ chmod +x /u01/install/getMOSPatch.sh
[oracle@oracle-OEL69 ~]$ set mosUser="myuser@mydomain.com"
[oracle@oracle-OEL69 ~]$ set mosPass="xxx"
[oracle@oracle-OEL69 ~]$ cd /u01/install/
[oracle@oracle-OEL69 install]$ ./getMOSPatch.sh patch=6880880
: command not foundine 9:
: invalid option: line 11: set: -
set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
: command not foundine 12:
: command not foundine 21:
'/getMOSPatch.sh: line 71: syntax error near unexpected token `do
'/getMOSPatch.sh: line 71: ` do
[oracle@oracle-OEL69 install]$
[oracle@oracle-OEL69 install]$ head getMOSPatch.sh
#!/bin/bash
# Maris Elsins / Pythian / 2013
# Source: https://github.com/MarisElsins/TOOLS/blob/master/Shell/getMOSPatch.sh
# Inspired by John Piwowar's work: http://only4left.jpiwowar.com/2009/02/retrieving-oracle-patches-with-wget/
# Usage:
# getMOSPatch.sh reset=yes # Use to refresh the platform and language settings
# getMOSPatch.sh patch=patchnum_1[,patchnum_n]* [download=all] [regexp=...]# Use to download one or more patches. If "download=all" is set all patches will be downloaded without user interaction, you can also define regular expressen by passing regexp to filter the patch filenames.
# v1.0 Initial version
# v1.1 Added support for multipart patches, previously these were simply ignored.
[oracle@oracle-OEL69 install]$ wget https://raw.githubusercontent.com/MarisElsins/TOOLS/master/Shell/getMOSPatch.sh
--2018-01-22 00:04:59-- https://raw.githubusercontent.com/MarisElsins/TOOLS/master/Shell/getMOSPatch.sh
Resolving raw.githubusercontent.com... 151.101.92.133
Connecting to raw.githubusercontent.com|151.101.92.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6818 (6.7K) [text/plain]
Saving to: “getMOSPatch.sh.1”
100%[==============================================================================>] 6,818 --.-K/s in 0.002s
2018-01-22 00:04:59 (2.98 MB/s) - “getMOSPatch.sh.1” saved [6818/6818]
Quedó grabado con otro nombre, así que ajustando eso y permisos, lo corrí manualmente para ver si puedo reproducir el mismo error:
[oracle@oracle-OEL69 install]$ mv getMOSPatch.sh getMOSPatch.sh.win
[oracle@oracle-OEL69 install]$ mv getMOSPatch.sh.1 getMOSPatch.sh
[oracle@oracle-OEL69 install]$ ls -lrt
total 104
-rw-r--r--. 1 oracle oinstall 6818 Jan 22 00:04 getMOSPatch.sh
-rwx--x--x. 1 oracle oinstall 6633 Jan 22 00:05 getMOSPatch.sh.win
[oracle@oracle-OEL69 install]$ chmod +x getMOSPatch.sh
[oracle@oracle-OEL69 install]$
[oracle@oracle-OEL69 install]$ export mosPass='xxx'
[oracle@oracle-OEL69 install]$ export mosUser="myuser@mydomain.com"
[oracle@oracle-OEL69 install]$ ./getMOSPatch.sh patch=6880880
This version of getMOSPatch is obsolete
Download getMOSPatch V2 from: https://github.com/MarisElsins/getMOSPatch/raw/master/getMOSPatch.jar
Check the README for the new version here: https://github.com/MarisElsins/getMOSPatch/blob/master/README.md
Read my blog post about it here: http://bit.ly/getMOSPatchV2
Getting list of files for patch 6880880 for "Linux x86-64"
1 - p6880880_121010_Linux-x86-64.zip
2 - p6880880_122010_Linux-x86-64.zip
3 - p6880880_139000_Generic.zip
4 - p6880880_112000_Linux-x86-64.zip
5 - p6880880_132000_Generic.zip
6 - p6880880_111000_Linux-x86-64.zip
7 - p6880880_131000_Generic.zip
8 - p6880880_101000_Linux-x86-64.zip
9 - p6880880_102000_Linux-x86-64.zip
Comma-delimited list of files to download: 4
Files to download:
p6880880_112000_Linux-x86-64.zip
Downloading the patches:
Downloading file p6880880_112000_Linux-x86-64.zip ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 101M 100 101M 0 0 2123k 0 0:00:48 0:00:48 --:--:-- 1897k
p6880880_112000_Linux-x86-64.zip completed with status: 0
[oracle@oracle-OEL69 install]$
[oracle@oracle-OEL69 install]$ ls -lrt
total 103680
-rwxr-xr-x. 1 oracle oinstall 6818 Jan 22 00:04 getMOSPatch.sh
-rwx--x--x. 1 oracle oinstall 6633 Jan 22 00:05 getMOSPatch.sh.win
-rw-r--r--. 1 oracle oinstall 106060978 Jan 22 00:10 p6880880_112000_Linux-x86-64.zip
[oracle@oracle-OEL69 install]$
Esta vez funcionó bien, lo que confirma que había algún problema con la versión original del script o con la copia de ubuntu en windows a la VM.
Para confirmar cual de las dos fue la que causó el error, habría que poner la versión nueva del script en ubuntu, borrar la VM y repetir los pasos hechos hasta acá.
Les dejo eso como ejercicio.
Para ahorrame ejecutar la instalación desde el principio, lo que implica repetir los ajustes manuales ya hechos, edito el playbook y comento los pasos que ejecuté manualmente hasta ahora, así validamos si con este nuevo ajuste se puede completar la configuración de Oracle.
Estas son las líneas comentadas:
vagrant-builder/ansible/install_opatch/main.yml:
# - name: copy getMOSPatch.sh script
...
# - name: set getMOSPatch.sh config
...
# - name: download opatch version 11.2
No tengo el log completo de esta ejecución porque lo dejé corriendo y al revisarlo una hora después tenía una BSOD :)
Pero despues de reiniciar y levantar manualmente las VM, todo estaba ahí corriendo:
[vagrant@oracle-OEL69 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
50G 3.6G 43G 8% /
tmpfs 1.5G 91M 1.4G 7% /dev/shm
/dev/sda1 477M 150M 302M 34% /boot
/dev/mapper/VolGroup-lv_home
12G 29M 11G 1% /home
/dev/mapper/vg_oracle-lv_oracle
35G 8.5G 25G 26% /u01
[vagrant@oracle-OEL69 ~]$ cat /etc/issue
Oracle Linux Server release 6.9
Kernel \r on an \m
[vagrant@oracle-OEL69 ~]$ ps -eaf | grep pmon
oracle 2005 1 0 01:14 ? 00:00:00 asm_pmon_+ASM
oracle 2100 1 0 01:14 ? 00:00:00 ora_pmon_orcl
vagrant 2446 2423 0 01:33 pts/0 00:00:00 grep pmon
[vagrant@oracle-OEL69 ~]$ su - oracle
Password:
[oracle@oracle-OEL69 ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle
[oracle@oracle-OEL69 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 22 01:34:08 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> set lines 180 pages 180
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/arch
Oldest online log sequence 10
Current log sequence 13
SQL> select file_name from dba_data_files;
FILE_NAME
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DATA/orcl/datafile/system.261.966039381
+DATA/orcl/datafile/sysaux.262.966039387
+DATA/orcl/datafile/undotbs1.263.966039393
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select count(1) from v$recover_file;
COUNT(1)
----------
0
SQL> select * From v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB
------------ ------------------------------ ----------- ---------- -------------------- ----------- ------ ---------- ---------- ----------- ------------ -----------------------
USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY V
-------------- ------------- ------------------------------------------------------------ ------------------------------------------------------------ -
1 DATA 512 4096 1048576 CONNECTED EXTERN 40960 39767 0 1193 0
39767 0 11.2.0.0.0 10.1.0.0.0 N
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Espero que les sirva de referencia si quieren intentar lo mismo.
Un saludo.
No hay comentarios.:
Publicar un comentario