首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >什么是junos_install_config更换模块?

什么是junos_install_config更换模块?
EN

Stack Overflow用户
提问于 2019-10-03 17:45:13
回答 1查看 282关注 0票数 0

在行动手册中使用Juniper.junos角色的junos_instal_config模块时,例如:

代码语言:javascript
复制
---
- name: Send Set Files to Different Devices
  hosts: all
  roles:
    - Juniper.junos
  connection: local
  gather_facts: no

  tasks:
    - name: " Install vMX1 File"
      junos_install_config:
              host = " {{ inventory_hostname }}"
              file = " /home/ubuntu/resources/vMX1.set"
              overwrite = false

运行攻略将返回以下弃用警告:

代码语言:javascript
复制
[DEPRECATION WARNING]: junos_install_config is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be
removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

然而,在阅读有关该模块的文档时,我似乎找不到替代它的是什么。谁能告诉我现在可以使用哪个模块在更高的版本中发送和安装".set“文件到Junos设备?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-10-04 21:55:07

您可以尝试使用juniper_junos_config模块来推送或检索配置。

代码语言:javascript
复制
  tasks:
    - name: Load configuration from a local file and commit
      juniper_junos_config:
        load: "merge"
        src: "build_conf/{{ inventory_hostname }}/junos.conf"

有关更多详细信息,请查看文档。https://www.juniper.net/documentation/en_US/junos-ansible/topics/topic-map/junos-ansible-configuration-loading-committing.html#task-configuration-load-file

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58216466

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档