ansible.builtin.bigip_device_sshd (v2.5.6) — module

Manage the SSHD settings of a BIG-IP

| "added in version" 2.2 of ansible.builtin"

Authors: Tim Rupp (@caphrim007)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.5.6

Description

Manage the SSHD settings of a BIG-IP.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the banner for the SSHD service from a string
  bigip_device_sshd:
    banner: enabled
    banner_text: banner text goes here
    password: secret
    server: lb.mydomain.com
    user: admin
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the banner for the SSHD service from a file
  bigip_device_sshd:
    banner: enabled
    banner_text: "{{ lookup('file', '/path/to/file') }}"
    password: secret
    server: lb.mydomain.com
    user: admin
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the SSHD service to run on port 2222
  bigip_device_sshd:
    password: secret
    port: 2222
    server: lb.mydomain.com
    user: admin
  delegate_to: localhost

Inputs

    
port:
    description:
    - Port that you want the SSH daemon to run on.

allow:
    choices:
    - all
    - IP address, such as 172.27.1.10
    - IP range, such as 172.27.*.* or 172.27.0.0/255.255.0.0
    description:
    - Specifies, if you have enabled SSH access, the IP address or address range for other
      systems that can use SSH to communicate with this system.

login:
    choices:
    - enabled
    - disabled
    description:
    - Specifies, when checked C(enabled), that the system accepts SSH communications.

banner:
    choices:
    - enabled
    - disabled
    description:
    - Whether to enable the banner or not.

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      auth_provider:
        description:
        - Configures the auth provider for to obtain authentication tokens from the remote
          device.
        - This option is really used when working with BIG-IQ devices.
        type: str
      no_f5_teem:
        default: false
        description:
        - If C(yes), TEEM telemetry data is not sent to F5.
        - You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
        - Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
        type: bool
      password:
        aliases:
        - pass
        - pwd
        description:
        - The password for the user account used to connect to the BIG-IP or the BIG-IQ.
        - You may omit this option by setting the environment variable C(F5_PASSWORD).
        required: true
        type: str
      server:
        description:
        - The BIG-IP host or the BIG-IQ host.
        - You may omit this option by setting the environment variable C(F5_SERVER).
        required: true
        type: str
      server_port:
        default: 443
        description:
        - The BIG-IP server port.
        - You may omit this option by setting the environment variable C(F5_SERVER_PORT).
        type: int
      timeout:
        description:
        - Specifies the timeout in seconds for communicating with the network device for
          either connecting or sending commands.  If the timeout is exceeded before the
          operation is completed, the module will error.
        type: int
      transport:
        choices:
        - rest
        default: rest
        description:
        - Configures the transport connection to use when connecting to the remote device.
        type: str
      user:
        description:
        - The username to connect to the BIG-IP or the BIG-IQ. This user must have administrative
          privileges on the device.
        - You may omit this option by setting the environment variable C(F5_USER).
        required: true
        type: str
      validate_certs:
        default: true
        description:
        - If C(no), SSL certificates are not validated. Use this only on personally controlled
          sites using self-signed certificates.
        - You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS).
        type: bool
    type: dict
    version_added: 1.0.0
    version_added_collection: f5networks.f5_modules

log_level:
    choices:
    - debug
    - debug1
    - debug2
    - debug3
    - error
    - fatal
    - info
    - quiet
    - verbose
    description:
    - Specifies the minimum SSHD message level to include in the system log.

banner_text:
    description:
    - Specifies the text to include on the pre-login banner that displays when a user
      attempts to login to the system using SSH.

inactivity_timeout:
    description:
    - Specifies the number of seconds before inactivity causes an SSH session to log out.

Outputs

allow:
  description: 'Specifies, if you have enabled SSH access, the IP address or address
    range for other systems that can use SSH to communicate with this system.

    '
  returned: changed
  sample: 192.0.2.*
  type: string
banner:
  description: Whether the banner is enabled or not.
  returned: changed
  sample: true
  type: string
banner_text:
  description: 'Specifies the text included on the pre-login banner that displays
    when a user attempts to login to the system using SSH.

    '
  returned: changed and success
  sample: This is a corporate device. Connecting to it without...
  type: string
inactivity_timeout:
  description: 'The number of seconds before inactivity causes an SSH session to log
    out.

    '
  returned: changed
  sample: 10
  type: int
log_level:
  description: The minimum SSHD message level to include in the system log.
  returned: changed
  sample: debug
  type: string
login:
  description: Specifies that the system accepts SSH communications or not.
  returned: changed
  sample: true
  type: bool
port:
  description: Port that you want the SSH daemon to run on.
  returned: changed
  sample: 22
  type: int