Class: Ansible::Ruby::Modules::Psexec
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Psexec
- Defined in:
- lib/ansible/ruby/modules/generated/commands/psexec.rb
Overview
Runs a remote command from a Linux host to a Windows host without WinRM being set up. Can be run on the Ansible controller to bootstrap Windows hosts to get them ready for WinRM.
Instance Method Summary collapse
-
#arguments ⇒ String?
Any arguments as a single string to use when running the executable.
-
#asynchronous ⇒ Symbol?
Will run the command as a detached process and the module returns immediately after starting the processs while the process continues to run in the background.,The I(stdout) and I(stderr) return values will be null when this is set to C(yes).,The I(stdin) option does not work with this type of process.,The I(rc) return value is not set when this is C(yes).
-
#connection_password ⇒ String?
The password for I(connection_user).,Required if the Kerberos requirements are not installed or the username is a local account to the Windows host.,Can be omitted to use a Kerberos principal ticket for the principal set by I(connection_user) if the Kerberos library is installed and the ticket has already been retrieved with the C(kinit) command before.
-
#connection_timeout ⇒ String?
The timeout in seconds to wait when receiving the initial SMB negotiate response from the server.
-
#connection_username ⇒ String?
The username to use when connecting to the remote Windows host.,This user must be a member of the C(Administrators) group of the Windows host.,Required if the Kerberos requirements are not installed or the username is a local account to the Windows host.,Can be omitted to use the default Kerberos principal ticket in the local credential cache if the Kerberos library is installed.,If I(process_username) is not specified, then the remote process will run under a Network Logon under this account.
-
#encrypt ⇒ Boolean?
Will use SMB encryption to encrypt the SMB messages sent to and from the host.,This requires the SMB 3 protocol which is only supported from Windows Server 2012 or Windows 8, older versions like Windows 7 or Windows Server 2008 (R2) must set this to C(no) and use no encryption.,When setting to C(no), the packets are in plaintext and can be seen by anyone sniffing the network, any process options are included in this.
-
#executable ⇒ String
The executable to run on the Windows host.
-
#hostname ⇒ String
The remote Windows host to connect to, can be either an IP address or a hostname.
-
#integrity_level ⇒ String?
The integrity level of the process when I(process_username) is defined and is not equal to C(System).,When C(default), the default integrity level based on the system setup.,When C(elevated), the command will be run with Administrative rights.,When C(limited), the command will be forced to run with non-Administrative rights.
-
#interactive ⇒ Symbol?
Will run the process as an interactive process that shows a process Window of the Windows session specified by I(interactive_session).,The I(stdout) and I(stderr) return values will be null when this is set to C(yes).,The I(stdin) option does not work with this type of process.
-
#interactive_session ⇒ Integer?
The Windows session ID to use when displaying the interactive process on the remote Windows host.,This is only valid when I(interactive) is C(yes).,The default is C(0) which is the console session of the Windows host.
-
#load_profile ⇒ Boolean?
Runs the remote command with the user’s profile loaded.
-
#port ⇒ Integer?
The port that the remote SMB service is listening on.
-
#priority ⇒ String?
Set the command’s priority on the Windows host.,See U(msdn.microsoft.com/en-us/library/windows/desktop/ms683211.aspx) for more details.
-
#process_password ⇒ String?
The password for I(process_username).,Required if I(process_username) is defined and not C(System).
-
#process_timeout ⇒ Integer?
The timeout in seconds that is placed upon the running process.,A value of C(0) means no timeout.
-
#process_username ⇒ String?
The user to run the process as.,This can be set to run the process under an Interactive logon of the specified account which bypasses limitations of a Network logon used when this isn’t specified.,If omitted then the process is run under the same account as I(connection_username) with a Network logon.,Set to C(System) to run as the builtin SYSTEM account, no password is required with this account.,If I(encrypt) is C(no), the username and password are sent as a simple XOR scrambled byte string that is not encrypted.
-
#show_ui_on_logon_screen ⇒ Symbol?
Shows the process UI on the Winlogon secure desktop when I(process_username) is C(System).
-
#stdin ⇒ String?
Data to send on the stdin pipe once the process has started.,This option has no effect when I(interactive) or I(asynchronous) is C(yes).
-
#working_directory ⇒ String?
Changes the working directory set when starting the process.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#arguments ⇒ String?
Returns Any arguments as a single string to use when running the executable.
41 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 41 attribute :arguments |
#asynchronous ⇒ Symbol?
Returns Will run the command as a detached process and the module returns immediately after starting the processs while the process continues to run in the background.,The I(stdout) and I(stderr) return values will be null when this is set to C(yes).,The I(stdin) option does not work with this type of process.,The I(rc) return value is not set when this is C(yes).
49 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 49 attribute :asynchronous |
#connection_password ⇒ String?
Returns The password for I(connection_user).,Required if the Kerberos requirements are not installed or the username is a local account to the Windows host.,Can be omitted to use a Kerberos principal ticket for the principal set by I(connection_user) if the Kerberos library is installed and the ticket has already been retrieved with the C(kinit) command before.
21 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 21 attribute :connection_password |
#connection_timeout ⇒ String?
Returns The timeout in seconds to wait when receiving the initial SMB negotiate response from the server.
33 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 33 attribute :connection_timeout |
#connection_username ⇒ String?
Returns The username to use when connecting to the remote Windows host.,This user must be a member of the C(Administrators) group of the Windows host.,Required if the Kerberos requirements are not installed or the username is a local account to the Windows host.,Can be omitted to use the default Kerberos principal ticket in the local credential cache if the Kerberos library is installed.,If I(process_username) is not specified, then the remote process will run under a Network Logon under this account.
17 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 17 attribute :connection_username |
#encrypt ⇒ Boolean?
Returns Will use SMB encryption to encrypt the SMB messages sent to and from the host.,This requires the SMB 3 protocol which is only supported from Windows Server 2012 or Windows 8, older versions like Windows 7 or Windows Server 2008 (R2) must set this to C(no) and use no encryption.,When setting to C(no), the packets are in plaintext and can be seen by anyone sniffing the network, any process options are included in this.
29 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 29 attribute :encrypt |
#executable ⇒ String
Returns The executable to run on the Windows host.
37 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 37 attribute :executable |
#hostname ⇒ String
Returns The remote Windows host to connect to, can be either an IP address or a hostname.
13 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 13 attribute :hostname |
#integrity_level ⇒ String?
Returns The integrity level of the process when I(process_username) is defined and is not equal to C(System).,When C(default), the default integrity level based on the system setup.,When C(elevated), the command will be run with Administrative rights.,When C(limited), the command will be forced to run with non-Administrative rights.
65 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 65 attribute :integrity_level |
#interactive ⇒ Symbol?
Returns Will run the process as an interactive process that shows a process Window of the Windows session specified by I(interactive_session).,The I(stdout) and I(stderr) return values will be null when this is set to C(yes).,The I(stdin) option does not work with this type of process.
69 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 69 attribute :interactive |
#interactive_session ⇒ Integer?
Returns The Windows session ID to use when displaying the interactive process on the remote Windows host.,This is only valid when I(interactive) is C(yes).,The default is C(0) which is the console session of the Windows host.
73 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 73 attribute :interactive_session |
#load_profile ⇒ Boolean?
Returns Runs the remote command with the user’s profile loaded.
53 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 53 attribute :load_profile |
#port ⇒ Integer?
Returns The port that the remote SMB service is listening on.
25 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 25 attribute :port |
#priority ⇒ String?
Returns Set the command’s priority on the Windows host.,See U(msdn.microsoft.com/en-us/library/windows/desktop/ms683211.aspx) for more details.
77 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 77 attribute :priority |
#process_password ⇒ String?
Returns The password for I(process_username).,Required if I(process_username) is defined and not C(System).
61 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 61 attribute :process_password |
#process_timeout ⇒ Integer?
Returns The timeout in seconds that is placed upon the running process.,A value of C(0) means no timeout.
85 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 85 attribute :process_timeout |
#process_username ⇒ String?
Returns The user to run the process as.,This can be set to run the process under an Interactive logon of the specified account which bypasses limitations of a Network logon used when this isn’t specified.,If omitted then the process is run under the same account as I(connection_username) with a Network logon.,Set to C(System) to run as the builtin SYSTEM account, no password is required with this account.,If I(encrypt) is C(no), the username and password are sent as a simple XOR scrambled byte string that is not encrypted. No special tools are required to get the username and password just knowledge of the protocol.
57 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 57 attribute :process_username |
#show_ui_on_logon_screen ⇒ Symbol?
Returns Shows the process UI on the Winlogon secure desktop when I(process_username) is C(System).
81 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 81 attribute :show_ui_on_logon_screen |
#stdin ⇒ String?
Returns Data to send on the stdin pipe once the process has started.,This option has no effect when I(interactive) or I(asynchronous) is C(yes).
89 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 89 attribute :stdin |
#working_directory ⇒ String?
Returns Changes the working directory set when starting the process.
45 |
# File 'lib/ansible/ruby/modules/generated/commands/psexec.rb', line 45 attribute :working_directory |