cisco.mso.mso_remote_location 模块 – 管理远程位置
注意
此模块是 cisco.mso 集合 (版本 2.9.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install cisco.mso
。您需要其他要求才能使用此模块,有关详细信息,请参见 需求。
要在剧本中使用它,请指定: cisco.mso.mso_remote_location
。
概要
管理 Cisco ACI 多站点上的远程位置。
需求
执行此模块的主机需要以下需求。
多站点编排器 v2.1 或更高版本
参数
参数 |
注释 |
---|---|
用于连接到远程服务器的身份验证方法。 选项
|
|
远程位置的描述。 |
|
ACI 多站点编排器主机的 IP 地址或主机名。 如果任务中未指定此值,则将使用环境变量 |
|
用于身份验证的登录域名称。 默认值为 Local。 如果任务中未指定此值,则将使用环境变量 使用 HTTPAPI 连接插件时,如果未指定此属性,将使用清单变量 |
|
影响此 MSO 模块的输出。
如果任务中未指定此值,则将使用环境变量 选项
|
|
用于身份验证的密码。 如果任务中未指定此值,则将使用环境变量 |
|
用于 REST 连接的端口号。 默认值取决于参数 `use_ssl`。 如果任务中未指定此值,则将使用环境变量 |
|
远程服务器的主机名或 IP 地址。 |
|
远程位置的名称。 |
|
用于登录远程服务器的密码。 |
|
远程服务器上保存备份的目录的完整路径。 路径必须以斜杠 (/) 字符开头,并且不能包含句点 (.) 或反斜杠 (\)。 该目录必须已存在于服务器上。 |
|
用于连接到远程服务器的端口。 默认值: |
|
用于导出到远程服务器的协议。 如果远程位置是 Windows 服务器,则必须使用 选项
|
|
用于登录远程服务器的私有 ssh 密钥。 私有 ssh 密钥必须以 PEM 格式提供。 私有 ssh 密钥必须是单行字符串,换行符表示为“\n”。 |
|
用于登录远程服务器的私有 ssh 密钥密码。 |
|
用于登录远程服务器的用户名。 |
|
使用 使用 选项
|
|
以秒为单位的套接字级别超时。 默认值为 30 秒。 如果任务中未指定此值,则将使用环境变量 |
|
如果为 如果任务中未指定值,则将改用环境变量 默认值为 选项
|
|
如果为 如果任务中未指定值,则将改用环境变量 当使用HTTPAPI连接插件时,如果未指定此属性,则将使用清单变量 使用HTTPAPI连接插件(mso或nd)时,默认值为 选项
|
|
用于身份验证的用户名。 如果任务中未指定值,则将改用环境变量 |
|
如果为 只有在使用自签名证书的个人控制站点时,才应将其设置为 如果任务中未指定值,则将改用环境变量 默认值为 选项
|
注释
注意
此模块编写用于支持Multi Site Orchestrator v2.1或更高版本。早期版本可能无法使用部分或全部功能。
示例
- name: Query all remote locations
cisco.mso.mso_remote_location:
host: mso_host
username: admin
password: SomeSecretPassword
state: query
register: backups
- name: Query a remote location
cisco.mso.mso_remote_location:
host: mso_host
username: admin
password: SomeSecretPassword
remote_location: ansible_test
state: query
register: query_result
- name: Configure a remote location
cisco.mso.mso_remote_location:
host: mso_host
username: admin
password: SomeSecretPassword
remote_location: ansible_test
remote_protocol: scp
remote_host: 10.0.0.1
remote_path: /username/backup
remote_authentication_type: password
remote_username: username
remote_password: password
state: present
- name: Delete a remote location
cisco.mso.mso_remote_location:
host: mso_host
username: admin
password: SomeSecretPassword
remote_location: ansible_test
state: absent