ansible_basic_installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ansible_basic_installation [2020/03/09 13:54] andonovjansible_basic_installation [2021/12/07 20:42] (current) andonovj
Line 6: Line 6:
   * Installing ubuntu Subsystem (only Windows 10+)   * Installing ubuntu Subsystem (only Windows 10+)
  
-We will do it both ways here :)+We will do it both ways here, but before we continue it is important to mention that ansible is disered state / agentless / automation system. 
 +In order for it to communicate with the targets it relies on: 
 + 
 +  * WinRm - For Windows Systems 
 +  * SSH - For Linux Systems 
 + 
 +So let's continue all :) 
 ====Cygwin==== ====Cygwin====
 Downloading and installing Cygwin is fairly easy. Just download the Cygwin and select ansible in the package: Downloading and installing Cygwin is fairly easy. Just download the Cygwin and select ansible in the package:
Line 52: Line 59:
 The following package was automatically installed and is no longer required: The following package was automatically installed and is no longer required:
   libfreetype6   libfreetype6
-Use 'apt autoremove' to remove it. 
-The following additional packages will be installed: 
-  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 
-  gcc gcc-7 gcc-7-base gcc-8-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 
-  libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1 libexpat1-dev libfakeroot 
-  libfile-fcntllock-perl libgcc-7-dev libgcc1 libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev 
-  libpython3.6 libpython3.6-dev libpython3.6-minimal libpython3.6-stdlib libquadmath0 libssl1.1 libstdc++-7-dev 
-  libstdc++6 libtsan0 libubsan0 linux-libc-dev make manpages-dev python-pip-whl python3-crypto python3-dev 
-  python3-distutils python3-keyring python3-keyrings.alt python3-lib2to3 python3-secretstorage python3-setuptools 
-  python3-wheel python3-xdg python3.6 python3.6-dev python3.6-minimal 
-Suggested packages: 
-  binutils-doc cpp-doc gcc-7-locales debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg 
-  gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg 
-  libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg 
-  glibc-doc bzr libstdc++-7-doc make-doc python-crypto-doc gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0 
-  python-secretstorage-doc python-setuptools-doc python3.6-venv python3.6-doc binfmt-support 
-The following NEW packages will be installed: 
-  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 
-  gcc gcc-7 gcc-7-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 
-  libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot 
-  libfile-fcntllock-perl libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev 
-  libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev python-pip-whl 
-  python3-crypto python3-dev python3-distutils python3-keyring python3-keyrings.alt python3-lib2to3 python3-pip 
-  python3-secretstorage python3-setuptools python3-wheel python3-xdg python3.6-dev 
-The following packages will be upgraded: 
-  gcc-8-base libexpat1 libgcc1 libpython3.6 libpython3.6-minimal libpython3.6-stdlib libssl1.1 libstdc++6 python3.6 
-  python3.6-minimal 
-10 upgraded, 57 newly installed, 0 to remove and 133 not upgraded. 
-Need to get 92.6 MB of archives. 
-After this operation, 249 MB 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 libexpat1 amd64 2.2.5-3ubuntu0.2 [ 
 ----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
 </Code> </Code>
Line 93: Line 68:
 root@DESKTOP-N65RKDP:~# apt-add-repository ppa:ansible/ansible root@DESKTOP-N65RKDP:~# 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.  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.
 +</Code>
  
-http://ansible.com/ +====Communicate with Windows==== 
- More infohttps://launchpad.net/~ansible/+archive/ubuntu/ansible +To communicate with windows we have to install couple other modules:
-Press [ENTER] to continue or Ctrl-c to cancel adding it.+
  
-Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease +  * Pywinrm - Used for communication with Windows 
-Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease +  * Pywinram[credssp] - Used for authentication 
-Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease + 
-Get:4 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic InRelease [15.9 kB] +<Code:bash|Install pywinrm> 
-Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease +root@DESKTOP-N65RKDP:~# pip3 install pywinrm 
-Get:6 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic/main amd64 Packages [692 B+Collecting pywinrm 
-Get:7 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic/main Translation-en [472 B+  Downloading https://files.pythonhosted.org/packages/fc/88/be0ea1af44c3bcc54e4c41e4056986743551693c77dfe50b48a3f4ba1bf7/pywinrm-0.4.1.tar.gz 
-Fetched 17.0 kB in 4s (3854 B/s) +Requirement already satisfiedrequests>=2.9.1 in /usr/lib/python3/dist-packages (from pywinrm) 
-Reading package lists... Done +Collecting requests_ntlm>=0.3.0 (from pywinrm) 
-root@DESKTOP-N65RKDP:~# apt-get install ansible -y +  Downloading https://files.pythonhosted.org/packages/03/4b/8b9a1afde8072c4d5710d9fa91433d504325821b038e00237dc8d6d833dc/requests_ntlm-1.1.0-py2.py3-none-any.whl 
-Reading package lists... Done +root@DESKTOP-N65RKDP:~# pip3 install pywinrm[credssp] 
-Building dependency tree +Requirement already satisfiedpywinrm[credssp] in /usr/local/lib/python3.6/dist-packages 
-Reading state information... Done +Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pywinrm[credssp]) 
-The following package was automatically installed and is no longer required: +Requirement already satisfiedrequests>=2.9.1 in /usr/lib/python3/dist-packages (from pywinrm[credssp]) 
-  libfreetype6 +Requirement already satisfied: requests-ntlm>=0.3.0 in /usr/local/lib/python3.6/dist-packages (from pywinrm[credssp]) 
-Use 'apt autoremove' to remove it. +Requirement already satisfiedxmltodict in /usr/local/lib/python3.6/dist-packages (from pywinrm[credssp]) 
-The following additional packages will be installed: +Collecting requests-credssp>=1.0.0; extra == "credssp" (from pywinrm[credssp]) 
-  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-asn1crypto python-cffi-backend python-crypto +  Downloading https://files.pythonhosted.org/packages/e8/b9/43cd780
-  python-cryptography python-enum34 python-httplib2 python-idna python-ipaddress python-jinja2 python-markupsafe +
-  python-minimal python-paramiko python-pkg-resources python-pyasn1 python-setuptools python-six python-yaml python2.+
-  python2.7-minimal sshpass +
-Suggested packages:+
 </Code> </Code>
  
 +=====Install Collections=====
 +From Ansible 2.10 or so, you have to install collections in Ansible, if you want to use them:
 +
 +====Install Oracle OCI====
 +To install Oracle collection: (oracle.oci) just run the following commands:
 +
 +<Code:bash|Install oracle.oci>
 +julien.andonov@julienaonovsMBP oci-ansible-collection % ansible-galaxy collection install oracle.oci
 +Starting galaxy collection install process
 +Process install dependency map
 +Starting collection install process
 +Downloading https://galaxy.ansible.com/download/oracle-oci-2.36.0.tar.gz to /Users/julien.andonov/.ansible/tmp/ansible-local-881012o19jld_/tmp_jma691c/oracle-oci-2.36.0-t77z2xqd
 +Installing 'oracle.oci:2.36.0' to '/Users/julien.andonov/.ansible/collections/ansible_collections/oracle/oci'
 +oracle.oci:2.36.0 was installed successfully
 +julien.andonov@julienaonovsMBP oci-ansible-collection %
 +
 +</Code>
  • ansible_basic_installation.1583762080.txt.gz
  • Last modified: 2020/03/09 13:54
  • by andonovj