我创建了名为 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默认文件是哪个以及在哪里可以找到它?
有人可以帮助我理解和解决它吗
- name: Copying file to sever2
fetch:
src: /tmp/
dest: /u0/test/
when:
"{{ inventory_hostname == 'testdb' }}"
Run Code Online (Sandbox Code Playgroud) 有人可以帮助我使用 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)