#157 Drop 'ssh' from 'ansible_ssh_{host|port|user}' inventory variables
Merged 6 years ago by astepano. Opened 6 years ago by astepano.

file modified
+3 -3
@@ -52,10 +52,10 @@ 

    - add_host:

        name: "{{ vm_name }}"

        ansible_ssh_common_args: "{{ inventory_data.ansible_ssh_common_args }}"

-       ansible_ssh_host: "{{ inventory_data.ansible_ssh_host }}"

+       ansible_host: "{{ inventory_data.ansible_host }}"

        ansible_ssh_pass: "{{ inventory_data.ansible_ssh_pass }}"

-       ansible_ssh_port: "{{ inventory_data.ansible_ssh_port }}"

+       ansible_port: "{{ inventory_data.ansible_port }}"

        ansible_ssh_private_key_file: "{{ inventory_data.ansible_ssh_private_key_file }}"

-       ansible_ssh_user: "{{ inventory_data.ansible_ssh_user }}"

+       ansible_user: "{{ inventory_data.ansible_user }}"

        ansible_python_interpreter: "{% if vm_python_interpreter != '' %}{{ vm_python_interpreter }}{% else %}/usr/bin/python2{% endif %}"

  ```

@@ -179,9 +179,9 @@ 

          try:

              # The variables

              variables = {

-                 "ansible_ssh_port": "{0}".format(port),

-                 "ansible_ssh_host": "127.0.0.3",

-                 "ansible_ssh_user": "root",

+                 "ansible_port": "{0}".format(port),

+                 "ansible_host": "127.0.0.3",

+                 "ansible_user": "root",

                  "ansible_ssh_pass": "foobar",

                  "ansible_ssh_private_key_file": identity,

                  "ansible_ssh_common_args": "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"

@@ -174,7 +174,7 @@ 

  

      # The variables

      variables = {

-         "ansible_ssh_user": "root",

+         "ansible_user": "root",

          "ansible_ssh_pass": ROOT_PASSWORD,

          "ansible_ssh_common_args": "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"

      }
@@ -186,14 +186,14 @@ 

          key, val = ln

  

          if key == "HostName":

-             variables["ansible_ssh_host"] = val

+             variables["ansible_host"] = val

          elif key == "Port":

-             variables["ansible_ssh_port"] = val

+             variables["ansible_port"] = val

          elif key == "IdentityFile":

              variables["ansible_ssh_private_key_file"] = val

  

      # verify we have all critical SSH configuration values

-     for key in ["ansible_ssh_host", "ansible_ssh_port", "ansible_ssh_private_key_file"]:

+     for key in ["ansible_host", "ansible_port", "ansible_ssh_private_key_file"]:

          if key not in variables:

              raise RuntimeError("failed to retrieve vagrant SSH configuration value {0}\n".format(key))

  
@@ -259,8 +259,8 @@ 

          sys.stderr.write("\n")

          sys.stderr.write("DIAGNOSE: ssh -p {0} -o StrictHostKeyChecking=no"

                           " -o UserKnownHostsFile=/dev/null"

-                          "root@{1} # password: {2}\n".format(variables["ansible_ssh_port"],

-                                                              variables["ansible_ssh_host"],

+                          "root@{1} # password: {2}\n".format(variables["ansible_port"],

+                                                              variables["ansible_host"],

                                                               ROOT_PASSWORD))

          sys.stderr.write("DIAGNOSE: kill {0} # when finished\n".format(os.getpid()))

  

@@ -3,7 +3,7 @@ 

    add_host:

      name: executor

      ansible_connection: local

-     ansible_ssh_host: 127.0.0.1

+     ansible_host: 127.0.0.1

      ansible_ssh_connection: local

  

  - name: Extract package source code