From 6af2b2a4cb0acecc8910089820a2e09424dc907e Mon Sep 17 00:00:00 2001 From: Sandra Wills Date: Thu, 8 Oct 2015 21:01:09 -0400 Subject: [PATCH 1/5] added note about ansible_ssh_* change added a note like the following to each file hit with unlabled 2.0 changes... Ansible 2.0 moved away from using ansible_ssh_* variables to accepting ansible_* variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (ansible_ssh_*), such as ansible_ssh_user instead of ansible_user and ansible_ssh_port instead of ansible_port, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. --- docsite/rst/faq.rst | 4 ++++ docsite/rst/guide_rax.rst | 4 ++++ docsite/rst/guide_vagrant.rst | 4 ++++ docsite/rst/intro_inventory.rst | 9 +++++++++ docsite/rst/intro_windows.rst | 4 ++++ docsite/rst/playbooks_variables.rst | 6 +++++- 6 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docsite/rst/faq.rst b/docsite/rst/faq.rst index fd08de00e92..ec48fbd1e7a 100644 --- a/docsite/rst/faq.rst +++ b/docsite/rst/faq.rst @@ -3,6 +3,10 @@ Frequently Asked Questions Here are some commonly-asked questions and their answers. +.. note:: + + Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user``, ``ansible_ssh_host`` instead of ``ansible_host``, and ``ansible_ssh_port`` instead of ``ansible_port``, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + .. _set_environment: How can I set the PATH or any other environment variable for a task or entire playbook? diff --git a/docsite/rst/guide_rax.rst b/docsite/rst/guide_rax.rst index 53c956f54e8..e90e6baf9ad 100644 --- a/docsite/rst/guide_rax.rst +++ b/docsite/rst/guide_rax.rst @@ -123,6 +123,10 @@ Here's what it would look like in a playbook, assuming the parameters were defin The rax module returns data about the nodes it creates, like IP addresses, hostnames, and login passwords. By registering the return value of the step, it is possible used this data to dynamically add the resulting hosts to inventory (temporarily, in memory). This facilitates performing configuration actions on the hosts in a follow-on task. In the following example, the servers that were successfully created using the above task are dynamically added to a group called "raxhosts", with each nodes hostname, IP address, and root password being added to the inventory. +.. note:: + + Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user`` and ``ansible_ssh_host`` instead of ``ansible_host``, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + .. code-block:: yaml - name: Add the instances we created (by public IP) to the group 'raxhosts' diff --git a/docsite/rst/guide_vagrant.rst b/docsite/rst/guide_vagrant.rst index 122242ccc1f..ca951be662e 100644 --- a/docsite/rst/guide_vagrant.rst +++ b/docsite/rst/guide_vagrant.rst @@ -105,6 +105,10 @@ inventory file may look something like this: machine ansible_host=127.0.0.1 ansible_port=2222 +.. note:: + + Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_host`` instead of ``ansible_host`` and ``ansible_ssh_port`` instead of ``ansible_port``, which appear in the above content. These shorter variables are ignored, without warning, in older versions of Ansible. + If you want to run Ansible manually, you will want to make sure to pass ``ansible`` or ``ansible-playbook`` commands the correct arguments for the username (usually ``vagrant``) and the SSH key (since Vagrant 1.7.0, this will be something like diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index d3ac8cfa185..666d1a627de 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -64,8 +64,17 @@ For numeric patterns, leading zeros can be included or removed, as desired. Rang [databases] db-[a:f].example.com + You can also select the connection type and user on a per host basis:: +.. note:: + + Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. + +You can also select the connection type and user on a per host basis: + +:: + [targets] localhost ansible_connection=local diff --git a/docsite/rst/intro_windows.rst b/docsite/rst/intro_windows.rst index a5b7c619ef1..0db94428945 100644 --- a/docsite/rst/intro_windows.rst +++ b/docsite/rst/intro_windows.rst @@ -154,6 +154,10 @@ Ansible's windows support relies on a few standard variables to indicate the use winserver1.example.com winserver2.example.com +.. note:: + + Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user`` and ``ansible_ssh_port`` instead of ``ansible_port``, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + In group_vars/windows.yml, define the following inventory variables:: # it is suggested that these be encrypted with ansible-vault: diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 7b71223f239..74a2caae9e3 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -719,7 +719,7 @@ or in a file as above. .. _variable_precedence: Variable Precedence: Where Should I Put A Variable? -``````````````````````````````````````````````````` +```````````````````````````````````````````````````` A lot of folks may ask about how variables override another. Ultimately it's Ansible's philosophy that it's better you know where to put a variable, and then you have to think about it a lot less. @@ -735,6 +735,10 @@ a use for it. If multiple variables of the same name are defined in different places, they get overwritten in a certain order. +.. note:: + + Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user``, which appears in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + In 1.x the precedence is: * extra vars (``-e`` in the command line) always win From f24fbb04c907136f307f782b18386695468b4add Mon Sep 17 00:00:00 2001 From: Sandra Wills Date: Thu, 8 Oct 2015 21:28:06 -0400 Subject: [PATCH 2/5] note modified a bit, then reviewed/approved by jmartin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ansible 2.0 has depricated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host, and ansible_port. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (ansible_ssh_*). These shorter variables are ignored, without warning, in older versions of Ansible. --- docsite/rst/faq.rst | 2 +- docsite/rst/guide_rax.rst | 2 +- docsite/rst/guide_vagrant.rst | 2 +- docsite/rst/intro_inventory.rst | 4 ++++ docsite/rst/intro_windows.rst | 2 +- docsite/rst/playbooks_variables.rst | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docsite/rst/faq.rst b/docsite/rst/faq.rst index ec48fbd1e7a..e78edd9fef7 100644 --- a/docsite/rst/faq.rst +++ b/docsite/rst/faq.rst @@ -5,7 +5,7 @@ Here are some commonly-asked questions and their answers. .. note:: - Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user``, ``ansible_ssh_host`` instead of ``ansible_host``, and ``ansible_ssh_port`` instead of ``ansible_port``, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. .. _set_environment: diff --git a/docsite/rst/guide_rax.rst b/docsite/rst/guide_rax.rst index e90e6baf9ad..f427e94d66e 100644 --- a/docsite/rst/guide_rax.rst +++ b/docsite/rst/guide_rax.rst @@ -125,7 +125,7 @@ The rax module returns data about the nodes it creates, like IP addresses, hostn .. note:: - Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user`` and ``ansible_ssh_host`` instead of ``ansible_host``, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. .. code-block:: yaml diff --git a/docsite/rst/guide_vagrant.rst b/docsite/rst/guide_vagrant.rst index ca951be662e..4b4f5ecf19e 100644 --- a/docsite/rst/guide_vagrant.rst +++ b/docsite/rst/guide_vagrant.rst @@ -107,7 +107,7 @@ inventory file may look something like this: .. note:: - Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_host`` instead of ``ansible_host`` and ``ansible_ssh_port`` instead of ``ansible_port``, which appear in the above content. These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. If you want to run Ansible manually, you will want to make sure to pass ``ansible`` or ``ansible-playbook`` commands the correct arguments for the diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index 666d1a627de..ea361cffd02 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -69,7 +69,11 @@ You can also select the connection type and user on a per host basis:: .. note:: +<<<<<<< HEAD Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +======= + Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +>>>>>>> 9d27412... note modified a bit, then reviewed/approved by jmartin You can also select the connection type and user on a per host basis: diff --git a/docsite/rst/intro_windows.rst b/docsite/rst/intro_windows.rst index 0db94428945..4430f0520a6 100644 --- a/docsite/rst/intro_windows.rst +++ b/docsite/rst/intro_windows.rst @@ -156,7 +156,7 @@ Ansible's windows support relies on a few standard variables to indicate the use .. note:: - Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user`` and ``ansible_ssh_port`` instead of ``ansible_port``, which appear in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. In group_vars/windows.yml, define the following inventory variables:: diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 74a2caae9e3..3d087369e64 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -737,7 +737,7 @@ If multiple variables of the same name are defined in different places, they get .. note:: - Ansible 2.0 moved away from using ``ansible_ssh_*`` variables to accepting ``ansible_*`` variables. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``), such as ``ansible_ssh_user`` instead of ``ansible_user``, which appears in the following content. These shorter variables are ignored, without warning, in older versions of Ansible. +Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. In 1.x the precedence is: From 84240c9f28408a66223e5d3f481da53edbc33309 Mon Sep 17 00:00:00 2001 From: Sandra Wills Date: Thu, 8 Oct 2015 21:44:50 -0400 Subject: [PATCH 3/5] fixed git conflict with double para --- docsite/rst/intro_inventory.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index ea361cffd02..6a99a917f15 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -69,11 +69,7 @@ You can also select the connection type and user on a per host basis:: .. note:: -<<<<<<< HEAD - Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. -======= Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. ->>>>>>> 9d27412... note modified a bit, then reviewed/approved by jmartin You can also select the connection type and user on a per host basis: From 748ff72b6b7ed3ec8d21f0b844835d4ab6bb59a8 Mon Sep 17 00:00:00 2001 From: Sandra Wills Date: Mon, 12 Oct 2015 08:01:24 -0400 Subject: [PATCH 4/5] fixed typo, depricated --> deprecated, in all 6 notes --- docsite/rst/faq.rst | 2 +- docsite/rst/guide_rax.rst | 2 +- docsite/rst/guide_vagrant.rst | 2 +- docsite/rst/intro_inventory.rst | 2 +- docsite/rst/intro_windows.rst | 2 +- docsite/rst/playbooks_variables.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docsite/rst/faq.rst b/docsite/rst/faq.rst index e78edd9fef7..ee6f5eacd6c 100644 --- a/docsite/rst/faq.rst +++ b/docsite/rst/faq.rst @@ -5,7 +5,7 @@ Here are some commonly-asked questions and their answers. .. note:: - Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. .. _set_environment: diff --git a/docsite/rst/guide_rax.rst b/docsite/rst/guide_rax.rst index f427e94d66e..8195b5e923e 100644 --- a/docsite/rst/guide_rax.rst +++ b/docsite/rst/guide_rax.rst @@ -125,7 +125,7 @@ The rax module returns data about the nodes it creates, like IP addresses, hostn .. note:: - Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. .. code-block:: yaml diff --git a/docsite/rst/guide_vagrant.rst b/docsite/rst/guide_vagrant.rst index 4b4f5ecf19e..746448c9b62 100644 --- a/docsite/rst/guide_vagrant.rst +++ b/docsite/rst/guide_vagrant.rst @@ -107,7 +107,7 @@ inventory file may look something like this: .. note:: - Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. If you want to run Ansible manually, you will want to make sure to pass ``ansible`` or ``ansible-playbook`` commands the correct arguments for the diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index 6a99a917f15..2fb934ab329 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -69,7 +69,7 @@ You can also select the connection type and user on a per host basis:: .. note:: - Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. You can also select the connection type and user on a per host basis: diff --git a/docsite/rst/intro_windows.rst b/docsite/rst/intro_windows.rst index 4430f0520a6..1cfd1eaf2e5 100644 --- a/docsite/rst/intro_windows.rst +++ b/docsite/rst/intro_windows.rst @@ -156,7 +156,7 @@ Ansible's windows support relies on a few standard variables to indicate the use .. note:: - Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. + Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. In group_vars/windows.yml, define the following inventory variables:: diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 3d087369e64..021b640a1f1 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -737,7 +737,7 @@ If multiple variables of the same name are defined in different places, they get .. note:: -Ansible 2.0 has depricated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. In 1.x the precedence is: From 32cb2fa21536ae23ba15a1a3dd0e7a3b552036b3 Mon Sep 17 00:00:00 2001 From: Sandra Wills Date: Mon, 12 Oct 2015 11:41:09 -0400 Subject: [PATCH 5/5] removed repetition of note and replaced with an include directive ansible_ssh_* changes from 1.9 to 2.0, original note made into a separate file for easier editing, and an include for this new file added to each of the 6 file affected by this change --- docsite/rst/ansible_ssh_changes_note.rst | 3 +++ docsite/rst/faq.rst | 5 ++--- docsite/rst/guide_rax.rst | 4 +--- docsite/rst/guide_vagrant.rst | 4 +--- docsite/rst/intro_inventory.rst | 6 +----- docsite/rst/intro_windows.rst | 4 +--- docsite/rst/playbooks_variables.rst | 4 +--- 7 files changed, 10 insertions(+), 20 deletions(-) create mode 100644 docsite/rst/ansible_ssh_changes_note.rst diff --git a/docsite/rst/ansible_ssh_changes_note.rst b/docsite/rst/ansible_ssh_changes_note.rst new file mode 100644 index 00000000000..ccc289d89db --- /dev/null +++ b/docsite/rst/ansible_ssh_changes_note.rst @@ -0,0 +1,3 @@ +.. note:: + + Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. diff --git a/docsite/rst/faq.rst b/docsite/rst/faq.rst index ee6f5eacd6c..90b9a1cb09e 100644 --- a/docsite/rst/faq.rst +++ b/docsite/rst/faq.rst @@ -3,9 +3,6 @@ Frequently Asked Questions Here are some commonly-asked questions and their answers. -.. note:: - - Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. .. _set_environment: @@ -25,6 +22,8 @@ How do I handle different machines needing different user accounts or ports to l Setting inventory variables in the inventory file is the easiest way. +.. include:: ansible_ssh_changes_note.rst + For instance, suppose these hosts have different usernames and ports:: [webservers] diff --git a/docsite/rst/guide_rax.rst b/docsite/rst/guide_rax.rst index 8195b5e923e..5ad806e4e58 100644 --- a/docsite/rst/guide_rax.rst +++ b/docsite/rst/guide_rax.rst @@ -123,9 +123,7 @@ Here's what it would look like in a playbook, assuming the parameters were defin The rax module returns data about the nodes it creates, like IP addresses, hostnames, and login passwords. By registering the return value of the step, it is possible used this data to dynamically add the resulting hosts to inventory (temporarily, in memory). This facilitates performing configuration actions on the hosts in a follow-on task. In the following example, the servers that were successfully created using the above task are dynamically added to a group called "raxhosts", with each nodes hostname, IP address, and root password being added to the inventory. -.. note:: - - Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +.. include:: ansible_ssh_changes_note.rst .. code-block:: yaml diff --git a/docsite/rst/guide_vagrant.rst b/docsite/rst/guide_vagrant.rst index 746448c9b62..2aad2f1a031 100644 --- a/docsite/rst/guide_vagrant.rst +++ b/docsite/rst/guide_vagrant.rst @@ -105,9 +105,7 @@ inventory file may look something like this: machine ansible_host=127.0.0.1 ansible_port=2222 -.. note:: - - Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +.. include:: ansible_ssh_changes_note.rst If you want to run Ansible manually, you will want to make sure to pass ``ansible`` or ``ansible-playbook`` commands the correct arguments for the diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index 2fb934ab329..0a9d4f0c9de 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -65,11 +65,7 @@ For numeric patterns, leading zeros can be included or removed, as desired. Rang db-[a:f].example.com -You can also select the connection type and user on a per host basis:: - -.. note:: - - Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +.. include:: ansible_ssh_changes_note.rst You can also select the connection type and user on a per host basis: diff --git a/docsite/rst/intro_windows.rst b/docsite/rst/intro_windows.rst index 1cfd1eaf2e5..64cd64b885a 100644 --- a/docsite/rst/intro_windows.rst +++ b/docsite/rst/intro_windows.rst @@ -154,9 +154,7 @@ Ansible's windows support relies on a few standard variables to indicate the use winserver1.example.com winserver2.example.com -.. note:: - - Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +.. include:: ansible_ssh_changes_note.rst In group_vars/windows.yml, define the following inventory variables:: diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 021b640a1f1..cf4fd7fb696 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -735,9 +735,7 @@ a use for it. If multiple variables of the same name are defined in different places, they get overwritten in a certain order. -.. note:: - -Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. +.. include:: ansible_ssh_changes_note.rst In 1.x the precedence is: