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:43] – 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 23: | Line 30: | ||
executable location = / | executable location = / | ||
python version = 3.7.4 (default, Jul 21 2019, 14:43:25) [GCC 7.4.0] | python version = 3.7.4 (default, Jul 21 2019, 14:43:25) [GCC 7.4.0] | ||
+ | </ | ||
+ | |||
+ | ====Ubuntu SubSystem==== | ||
+ | The ubuntu subsystem is available from the windows store and can be installed on Windows 10+ | ||
+ | After you install the ubuntu WS, we have to install couple other stuff before ansible :) So let's get going. | ||
+ | Firstly, we have to update our repo: | ||
+ | |||
+ | < | ||
+ | root@DESKTOP-N65RKDP: | ||
+ | Hit:1 http:// | ||
+ | Get:2 http:// | ||
+ | Get:3 http:// | ||
+ | Get:4 http:// | ||
+ | Get:5 http:// | ||
+ | Get:6 http:// | ||
+ | Get:7 http:// | ||
+ | Get:8 http:// | ||
+ | ----------------------------------------------------------------------------------------------- | ||
+ | </ | ||
+ | |||
+ | 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 | ||
+ | ----------------------------------------------------------------------------------------------------------------------- | ||
+ | </ | ||
+ | |||
+ | |||
+ | 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 % | ||
+ | |||
</ | </ |