From f7c9b5382df4acfea0726b01c62fffc09c3ed52a Mon Sep 17 00:00:00 2001 From: Jody Frankowski Date: Tue, 21 Jul 2015 13:47:03 +0200 Subject: [PATCH 1/2] Fix intro_inventory documented params. Update for the new 'become' system --- docsite/rst/intro_inventory.rst | 35 +++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index f3d8b0cdc51..f7c10ceefc6 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -192,8 +192,9 @@ is an excellent way to track changes to your inventory and host variables. List of Behavioral Inventory Parameters +++++++++++++++++++++++++++++++++++++++ -As alluded to above, setting the following variables controls how ansible interacts with remote hosts. Some we have already -mentioned:: +As alluded to above, setting the following variables controls how ansible interacts with remote hosts. + +Ssh connection:: ansible_ssh_host The name of the host to connect to, if different from the alias you wish to give to it. @@ -203,16 +204,38 @@ mentioned:: The default ssh user name to use. ansible_ssh_pass The ssh password to use (this is insecure, we strongly recommend using --ask-pass or SSH keys) + ansible_connection + Connection type of the host. Candidates are local, ssh or paramiko. The default is paramiko before Ansible 1.2, and 'smart' afterwards which detects whether usage of 'ssh' would be feasible based on whether ControlPersist is supported. + ansible_ssh_private_key_file + Private key file used by ssh. Useful if using multiple keys and you don't want to use SSH agent. + +Privilege escalation (see :doc:`Ansible Privilege Escalation` for further details). Since Ansible 1.9 you should use *ansible_become*:: + + ansible_become + Equivalent to ansible_sudo or ansible_su, allows to force privilege escalation + ansible_become_method + Allows to set privilege escalation method + ansible_become_user + Equivalent to ansible_sudo_user or ansible_su_user, allows to set the user you become through privilege escalation + ansible_become_pass + Equivalent to ansible_sudo_pass or ansible_su_pass, allows you to set the privilege escalation password ansible_sudo The boolean to decide if sudo should be used for this host. Defaults to false. + ansible_sudo_user + Run operations as this user if 'sudo' is enabled. ansible_sudo_pass The sudo password to use (this is insecure, we strongly recommend using --ask-sudo-pass) ansible_sudo_exe (new in version 1.8) The sudo command path. - ansible_connection - Connection type of the host. Candidates are local, ssh or paramiko. The default is paramiko before Ansible 1.2, and 'smart' afterwards which detects whether usage of 'ssh' would be feasible based on whether ControlPersist is supported. - ansible_ssh_private_key_file - Private key file used by ssh. Useful if using multiple keys and you don't want to use SSH agent. + ansible_su + The boolean to decide if su should be used for this host. Defaults to false. + ansible_su_user + Run operations as this user if 'su' is enabled. + ansible_su_pass + The su password to use (this is insecure, we strongly recommend using --ask-su-pass) + +Remote host environnement parameters:: + ansible_shell_type The shell type of the target system. Commands are formatted using 'sh'-style syntax by default. Setting this to 'csh' or 'fish' will cause commands executed on target systems to follow those shell's syntax instead. ansible_python_interpreter From 4713e58b57a2a6d592dac6b21ad2f6a0bddad18c Mon Sep 17 00:00:00 2001 From: Jody Frankowski Date: Tue, 21 Jul 2015 20:02:05 +0200 Subject: [PATCH 2/2] modify intro inventory params docs to be shorter, ansible_su/do is moved out --- docsite/rst/intro_inventory.rst | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/docsite/rst/intro_inventory.rst b/docsite/rst/intro_inventory.rst index f7c10ceefc6..3da45c82b76 100644 --- a/docsite/rst/intro_inventory.rst +++ b/docsite/rst/intro_inventory.rst @@ -194,6 +194,11 @@ List of Behavioral Inventory Parameters As alluded to above, setting the following variables controls how ansible interacts with remote hosts. +Host connection:: + + ansible_connection + Connection type to the host. Candidates are local, smart, ssh or paramiko. The default is smart. + Ssh connection:: ansible_ssh_host @@ -204,12 +209,10 @@ Ssh connection:: The default ssh user name to use. ansible_ssh_pass The ssh password to use (this is insecure, we strongly recommend using --ask-pass or SSH keys) - ansible_connection - Connection type of the host. Candidates are local, ssh or paramiko. The default is paramiko before Ansible 1.2, and 'smart' afterwards which detects whether usage of 'ssh' would be feasible based on whether ControlPersist is supported. ansible_ssh_private_key_file Private key file used by ssh. Useful if using multiple keys and you don't want to use SSH agent. -Privilege escalation (see :doc:`Ansible Privilege Escalation` for further details). Since Ansible 1.9 you should use *ansible_become*:: +Privilege escalation (see :doc:`Ansible Privilege Escalation` for further details):: ansible_become Equivalent to ansible_sudo or ansible_su, allows to force privilege escalation @@ -219,20 +222,6 @@ Privilege escalation (see :doc:`Ansible Privilege Escalation` for furthe Equivalent to ansible_sudo_user or ansible_su_user, allows to set the user you become through privilege escalation ansible_become_pass Equivalent to ansible_sudo_pass or ansible_su_pass, allows you to set the privilege escalation password - ansible_sudo - The boolean to decide if sudo should be used for this host. Defaults to false. - ansible_sudo_user - Run operations as this user if 'sudo' is enabled. - ansible_sudo_pass - The sudo password to use (this is insecure, we strongly recommend using --ask-sudo-pass) - ansible_sudo_exe (new in version 1.8) - The sudo command path. - ansible_su - The boolean to decide if su should be used for this host. Defaults to false. - ansible_su_user - Run operations as this user if 'su' is enabled. - ansible_su_pass - The su password to use (this is insecure, we strongly recommend using --ask-su-pass) Remote host environnement parameters::