Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ansible_basic_installation [2020/03/09 13:48] – andonovj | ansible_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 27: | Line 34: | ||
====Ubuntu SubSystem==== | ====Ubuntu SubSystem==== | ||
The ubuntu subsystem is available from the windows store and can be installed on Windows 10+ | The ubuntu subsystem is available from the windows store and can be installed on Windows 10+ | ||
- | After you install the ubuntu | + | After you install the ubuntu |
Firstly, we have to update our repo: | Firstly, we have to update our repo: | ||
Line 42: | Line 49: | ||
----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ||
</ | </ | ||
- | Then we have to install the software properties package: | ||
- | < | + | Then we have to install the pip: |
- | root@DESKTOP-N65RKDP: | + | |
- | 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' | + | |
- | 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 131 not upgraded. | + | |
- | Need to get 33.6 kB of archives. | + | |
- | After this operation, 13.3 kB of additional disk space will be used. | + | |
- | Get:1 http:// | + | |
- | Get:2 http:// | + | |
- | Fetched 33.6 kB in 1s (62.5 kB/s) | + | |
- | (Reading database ... 35252 files and directories currently installed.) | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking software-properties-common (0.96.24.32.12) over (0.96.24.32.7) ... | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking python3-software-properties (0.96.24.32.12) over (0.96.24.32.7) ... | + | |
- | Processing triggers for man-db (2.8.3-2ubuntu0.1) ... | + | |
- | Setting up python3-software-properties (0.96.24.32.12) ... | + | |
- | Processing triggers for dbus (1.12.2-1ubuntu1) ... | + | |
- | Setting up software-properties-common (0.96.24.32.12) ... | + | |
- | </ | + | |
- | + | ||
- | And lastly | + | |
< | < | ||
Line 82: | 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' | ||
- | 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:// | ||
----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ||
+ | </ | ||
+ | |||
+ | |||
+ | Really finally, we can install the ansible using the pything indexing or the Pip | ||
+ | |||
+ | < | ||
+ | root@DESKTOP-N65RKDP: | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ====Communicate with Windows==== | ||
+ | To communicate with windows we have to install couple other modules: | ||
+ | |||
+ | * Pywinrm - Used for communication with Windows | ||
+ | * Pywinram[credssp] - Used for authentication | ||
+ | |||
+ | < | ||
+ | root@DESKTOP-N65RKDP: | ||
+ | Collecting pywinrm | ||
+ | Downloading https:// | ||
+ | Requirement already satisfied: requests> | ||
+ | Collecting requests_ntlm> | ||
+ | Downloading https:// | ||
+ | root@DESKTOP-N65RKDP: | ||
+ | Requirement already satisfied: pywinrm[credssp] in / | ||
+ | Requirement already satisfied: six in / | ||
+ | Requirement already satisfied: requests> | ||
+ | Requirement already satisfied: requests-ntlm> | ||
+ | Requirement already satisfied: xmltodict in / | ||
+ | Collecting requests-credssp> | ||
+ | Downloading https:// | ||
+ | </ | ||
+ | |||
+ | =====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: | ||
+ | |||
+ | < | ||
+ | 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:// | ||
+ | Installing ' | ||
+ | oracle.oci: | ||
+ | julien.andonov@julienaonovsMBP oci-ansible-collection % | ||
+ | |||
</ | </ |