mirror of https://github.com/ansible/ansible.git
[WIP] Backport/2.7/batch port (#45859)
Batch of docs backports: * docs: Clarify include_task v import_tasks with conditionals (#43856) (cherry picked from commitpull/45894/head6be42a2a0e
) * Add single quotes around package name (#45152) (cherry picked from commit0d81386144
) * prefer ansible_facts namespace and dict notation (#44980) (cherry picked from commit44510448b0
) * fix cherrypick conflict - scenario_guides * Update implicit_localhost.rst (#45455) (cherry picked from commitf68cd1acc6
) * updated fbsd install instructions (#45309) (cherry picked from commite9c2695ce7
) * Change "Defaulting Undefined Variables" (#41379) (cherry picked from commite35c4be1c1
) * adds license details to dev guide pages (#45574) (cherry picked from commit6e68d77f6d
) * FAQ: fix a typo, add link to 'vars' lookup (#42412) (cherry picked from commit95649dc793
) * Fix link and toctree (#45595) (cherry picked from commit6999bf318f
) * Improve the local toctree (and title) (#45590) (cherry picked from commitafea00fa9f
) * Add undocumented configuration parameter and explain in porting guide (#36059) (cherry picked from commita892a6ef03
) * Simplify PPA installation for Ubuntu (#45690) (cherry picked from commit78e9f452a5
) * adding git+ssh uri scheme (#36025) (cherry picked from commit84a4257774
) * Add workaround for non-standard kerberos environments (#41465) (cherry picked from commit4e532e0ad9
) * Restore license agreement (#45809) (cherry picked from commitf430f60541
) * partial cherry-pick - lenovo doc update PR 45483
parent
7cc699f068
commit
ceb474bb9e
@ -0,0 +1,7 @@
|
|||||||
|
.. _contributor_license_agreement:
|
||||||
|
|
||||||
|
******************************
|
||||||
|
Contributors License Agreement
|
||||||
|
******************************
|
||||||
|
|
||||||
|
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project.
|
@ -0,0 +1,69 @@
|
|||||||
|
.. _cnos_platform_options:
|
||||||
|
|
||||||
|
***************************************
|
||||||
|
CNOS Platform Options
|
||||||
|
***************************************
|
||||||
|
|
||||||
|
CNOS supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on CNOS in Ansible.
|
||||||
|
|
||||||
|
.. contents:: Topics
|
||||||
|
|
||||||
|
Connections Available
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
|.. | CLI |
|
||||||
|
+===========================+===============================================+
|
||||||
|
| **Protocol** | SSH |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| | **Credentials** | | uses SSH keys / SSH-agent if present |
|
||||||
|
| | | | accepts ``-u myuser -k`` if using password |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| **Indirect Access** | via a bastion (jump host) |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| | **Connection Settings** | | ``ansible_connection: network_cli`` |
|
||||||
|
| | | | |
|
||||||
|
| | | | |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| | **Enable Mode** | | supported - use ``ansible_become: yes`` |
|
||||||
|
| | (Privilege Escalation) | | with ``ansible_become_method: enable`` |
|
||||||
|
| | | | and ``ansible_become_pass:`` |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| **Returned Data Format** | ``stdout[0].`` |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
|
||||||
|
For legacy playbooks, CNOS still supports ``ansible_connection: local``. We recommend modernizing to use ``ansible_connection: network_cli`` as soon as possible.
|
||||||
|
|
||||||
|
Using CLI in Ansible
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
Example CLI ``group_vars/cnos.yml``
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
ansible_connection: network_cli
|
||||||
|
ansible_network_os: cnos
|
||||||
|
ansible_user: myuser
|
||||||
|
ansible_ssh_pass: !vault...
|
||||||
|
ansible_become: yes
|
||||||
|
ansible_become_method: enable
|
||||||
|
ansible_become_pass: !vault...
|
||||||
|
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
|
||||||
|
|
||||||
|
|
||||||
|
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_ssh_pass`` configuration.
|
||||||
|
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
|
||||||
|
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
|
||||||
|
|
||||||
|
Example CLI Task
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
- name: Retreive CNOS OS version
|
||||||
|
cnos_command:
|
||||||
|
commands: show version
|
||||||
|
when: ansible_network_os == 'cnos'
|
||||||
|
|
||||||
|
.. include:: shared_snippets/SSH_warning.txt
|
@ -0,0 +1,69 @@
|
|||||||
|
.. _enos_platform_options:
|
||||||
|
|
||||||
|
***************************************
|
||||||
|
ENOS Platform Options
|
||||||
|
***************************************
|
||||||
|
|
||||||
|
ENOS supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on ENOS in Ansible.
|
||||||
|
|
||||||
|
.. contents:: Topics
|
||||||
|
|
||||||
|
Connections Available
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
|.. | CLI |
|
||||||
|
+===========================+===============================================+
|
||||||
|
| **Protocol** | SSH |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| | **Credentials** | | uses SSH keys / SSH-agent if present |
|
||||||
|
| | | | accepts ``-u myuser -k`` if using password |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| **Indirect Access** | via a bastion (jump host) |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| | **Connection Settings** | | ``ansible_connection: network_cli`` |
|
||||||
|
| | | | |
|
||||||
|
| | | | |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| | **Enable Mode** | | supported - use ``ansible_become: yes`` |
|
||||||
|
| | (Privilege Escalation) | | with ``ansible_become_method: enable`` |
|
||||||
|
| | | | and ``ansible_become_pass:`` |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
| **Returned Data Format** | ``stdout[0].`` |
|
||||||
|
+---------------------------+-----------------------------------------------+
|
||||||
|
|
||||||
|
For legacy playbooks, ENOS still supports ``ansible_connection: local``. We recommend modernizing to use ``ansible_connection: network_cli`` as soon as possible.
|
||||||
|
|
||||||
|
Using CLI in Ansible
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
Example CLI ``group_vars/enos.yml``
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
ansible_connection: network_cli
|
||||||
|
ansible_network_os: enos
|
||||||
|
ansible_user: myuser
|
||||||
|
ansible_ssh_pass: !vault...
|
||||||
|
ansible_become: yes
|
||||||
|
ansible_become_method: enable
|
||||||
|
ansible_become_pass: !vault...
|
||||||
|
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
|
||||||
|
|
||||||
|
|
||||||
|
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_ssh_pass`` configuration.
|
||||||
|
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
|
||||||
|
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
|
||||||
|
|
||||||
|
Example CLI Task
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
- name: Retreive ENOS OS version
|
||||||
|
enos_command:
|
||||||
|
commands: show version
|
||||||
|
when: ansible_network_os == 'enos'
|
||||||
|
|
||||||
|
.. include:: shared_snippets/SSH_warning.txt
|
@ -1,21 +1,15 @@
|
|||||||
Detailed Guides
|
:orphan:
|
||||||
```````````````
|
|
||||||
|
|
||||||
This section is new and evolving. The idea here is to explore particular use cases in greater depth and provide a more "top down" explanation of some basic features.
|
***************
|
||||||
|
Scenario Guides
|
||||||
|
***************
|
||||||
|
|
||||||
|
The guides in this section explore particular use cases in greater depth and provide a more "top-down" explanation of some basic features.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:glob:
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
guide_aci
|
guide_*
|
||||||
guide_aws
|
|
||||||
guide_azure
|
|
||||||
guide_rax
|
|
||||||
guide_gce
|
|
||||||
guide_cloudstack
|
|
||||||
guide_vagrant
|
|
||||||
guide_rolling_upgrade
|
|
||||||
guide_docker
|
|
||||||
guide_packet
|
|
||||||
guide_vultr
|
|
||||||
|
|
||||||
Pending topics may include: Docker, Jenkins, Google Compute Engine, Linode/DigitalOcean, Continuous Deployment, and more.
|
Pending topics may include: Jenkins, Linode/DigitalOcean, Continuous Deployment, and more.
|
||||||
|
Loading…
Reference in New Issue