小编aik*_*ooh的帖子

如何从 include_tasks 传回结果

昨天开始学习ansible,所以我相信我可能会在这里冒着XY问题的风险,但仍然\xe2\x80\xa6

\n\n

主要的yml:

\n\n
- hosts: localhost\n\n  vars_files:\n    [ "users.yml" ]\n  tasks:\n    - name: manage instances\n      #include_tasks: create_instance.yml\n      include_tasks: inhabit_instance.yml\n      with_dict: "{{users}}"\n      register: res\n    - name: print\n      debug: msg="{{res.results}}"\n
Run Code Online (Sandbox Code Playgroud)\n\n

inhabit_instance.yml:

\n\n
- name: Get instance info for {{ item.key }}\n  ec2_instance_facts:\n    profile: henryaws\n    filters:\n      "tag:name": "{{item.key}}"\n      instance-state-name: running\n  register: ec2\n- name: print\n  debug:\n    msg: "IP: {{ec2.instances.0.public_ip_address}}"\n
Run Code Online (Sandbox Code Playgroud)\n\n

这就是我想要的顶层 IP。还没有立即找到有关包含块的返回值的任何信息\xe2\x80\xa6

\n

ansible

6
推荐指数
1
解决办法
3558
查看次数

在 selenium 下启动的浏览器不使用插件

我正在使用 python+selenium,配置文件有插件。在启动时,它会暂时显示它们,但随后它们会被隐藏。它们存在,它们并没有被禁用,而是不可见且不起作用。我可以禁用和启用它,然后它会出现在任务栏上并且可以正常工作。 截屏

使用配置文件手动调用 Firefox 时,它可以工作。

这是打印到日志的内容。

1596129664500   mozrunner::runner   INFO    Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileO34n0s"
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 1325: uncaught exception: 2147746065
JavaScript error: resource://gre/modules/ExtensionContent.jsm, line 554: TypeError: Argument 1 of PrecompiledScript.executeInGlobal is not an object.
1596129672037   Marionette  INFO    Listening on port 41285
1596129672136   Marionette  WARN    TLS certificate errors will be ignored for this session
JavaScript error: undefined, line 14: Error: An unexpected error occurred
JavaScript error: moz-extension://45aaa1ae-14fe-4a8f-841d-6a9416fd5d09/lib/picture_in_picture_overrides.js, line 15: Error: Incorrect argument types for pictureInPictureParent.setOverrides.
1596129683512 …
Run Code Online (Sandbox Code Playgroud)

python firefox selenium user-profile

2
推荐指数
1
解决办法
874
查看次数

标签 统计

ansible ×1

firefox ×1

python ×1

selenium ×1

user-profile ×1