小编Pan*_*nda的帖子

找不到 ansible 配置文件;使用默认值

我创建了名为 venvansible并使用安装了 ansible pip3 install ansible。现在在检查ansible版本时config file = None

ansible --version
ansible 2.9.12
  config file = None
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/ansible/lib/python3.7/site-packages/ansible
  executable location = /home/ansible/ansible/bin/ansible
  python version = 3.7.4 (default, Aug 18 2019, 12:04:45) [GCC 5.4.0 20160609]
Run Code Online (Sandbox Code Playgroud)

当我运行 ansible 命令时,它会显示No config file found; using defaults默认文件是哪个以及在哪里可以找到它?

ansible

12
推荐指数
2
解决办法
3万
查看次数

Ansible:条件语句不应包含 jinja2 模板分隔符,例如 {{ }} 或 {% %}

有人可以帮助我理解和解决它吗

 - name: Copying file to sever2
    fetch:
      src: /tmp/
      dest: /u0/test/
    when:
      "{{ inventory_hostname == 'testdb' }}"
Run Code Online (Sandbox Code Playgroud)

ansible

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

pg_restore 使用 ssl 证书

有人可以帮助我使用 SSL 证书恢复 postgres db。我尝试了以下方式,但没有用

pg_restore "host=hostname user=username dbname=database_name sslcert=sslcert.crt sslkey=sslkey.key sslrootcert=sslroot.pem sslmode=verify-full" -f filename
Run Code Online (Sandbox Code Playgroud)

它给出了以下错误

pg_restore: [archiver] could not open input file "host=hostname user=username dbname=database_name sslcert=sslcert.crt sslkey=sslkey.key sslrootcert=sslroot.pem sslmode=verify-full": No such file or directory 
Run Code Online (Sandbox Code Playgroud)

postgresql ssl pg-restore

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

标签 统计

ansible ×2

pg-restore ×1

postgresql ×1

ssl ×1