小编RPT*_*RPT的帖子

Ansible 错误“无法创建临时目录”

我正在尝试使用跳转盒来到达 ansible 上的目标虚拟机。我有以下文件结构

play.yaml
hosts
  serverA
  serverB
  testServers/
    serverX
    serverY
    group_vars/
      all.yml
           
Run Code Online (Sandbox Code Playgroud)

server[X,Y]主机文件包含

[serverType]
1.2.3.4
Run Code Online (Sandbox Code Playgroud)

all.ymlhosts/testServers/包含下的文件

ansible_ssh_private_key_file: key.priv
proxy_user: myServiceAccount
proxy_user_key: key.priv
ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -i {{ proxy_user_key }} -W %h:%p -q {{ proxy_user }}@{{ bastion_host }} 
Run Code Online (Sandbox Code Playgroud)

我有一个 ping 模块play.yaml

- hosts: all  
  gather_facts: true
  tasks:
  - action: ping
Run Code Online (Sandbox Code Playgroud)

我运行以下命令

ansible-playbook -vvvv play.yaml -i hosts/testServers/serverX 
  -e ansible_ssh_user="$LDAP_USER" -e ansible_ssh_pass="$LDAP_PASS" 
  -e ansible_become_pass="$LDAP_PASS"
  -e bastion_host="$BASTION_NAME"
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

Failed to create temporary directory.In some cases, you …
Run Code Online (Sandbox Code Playgroud)

ansible

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

如何在 iFrame 上使用 CSP

我正在使用 iFrame 来包含外部 html 源https://good.com/main.html

\n\n
<iframe src=\xe2\x80\x9chttps://good.com/main.html" scrolling="no" style="overflow: hidden; height: 700px;"></iframe>\n
Run Code Online (Sandbox Code Playgroud)\n\n

good.com/main.html导入并执行以下 javascript

\n\n
https://good.com/a.js\nhttps://good.com/b.js\nhttps://bad.com/c.js\n
Run Code Online (Sandbox Code Playgroud)\n\n

有没有办法阻止good.com/main.html导入和执行bad.com/c.jshttps://good.com更具体地说,阻止任何与?不具有相同域的资源。

\n\n

我尝试对iFrame进行沙箱处理

\n\n
<iframe sandbox=\xe2\x80\x9callow-same-origin allow-scripts\xe2\x80\x9d src=\xe2\x80\x9chttps://good.com/main.html\xe2\x80\x9d scrolling="no" style="overflow: hidden; height: 700px;"></iframe>\n
Run Code Online (Sandbox Code Playgroud)\n\n

但它仍然导入并执行https://bad.com/c.js

\n\n

有没有办法阻止源导入并执行任何外部js?

\n\n

我读到有关iFrames 上的 CSP 的信息,但我不确定它\xe2\x80\x99s 的用法。

\n

html javascript css sandbox content-security-policy

3
推荐指数
1
解决办法
2967
查看次数