尝试使用ansible创建hetzner服务器,并遵循以下文档;https://community.hetzner.com/tutorials/howto-hcloud-ansible
由于某种原因,游戏手册被卡住了,没有创建服务器。知道为什么会这样吗?
Using /home/melvmagr/repos/ansible/ansible.cfg as config file
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
redirecting (type: modules) ansible.builtin.hcloud_server to hetzner.hcloud.hcloud_server
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: server.yml ************************************************************************************
1 plays in playground/server.yml
PLAY [Create Basic Server] ******************************************************************************
TASK [Gathering Facts] **********************************************************************************
task path: /home/melvmagr/repos/ansible/playground/server.yml:3
ok: [localhost]
META: ran handlers
TASK [Create a basic server] ****************************************************************************
task path: /home/melvmagr/repos/ansible/playground/server.yml:11
redirecting (type: modules) ansible.builtin.hcloud_server to hetzner.hcloud.hcloud_server剧本如下;
# server.yml
---
- name: Create Basic Server
hosts: localhost
connection: local
#gather_facts: False
user: root
vars:
hcloud_token: "my_hetzner_API_token"
tasks:
- name: Create a basic server
hcloud_server:
api_token: "my_hetzner_API_token"
name: test-server
server_type: cx11
#image: master-template-update-09-06-2022
image: ubuntu-18.04
state: present
register: server发布于 2022-06-17 09:35:21
comment by U880D实际上让我想到了我已经安装的python版本和模块。
我运行了以下命令,这样我就拥有了所有最新的东西:
apt-get install python
apt-get install python3 python3-pip python3-venv并且看到在运行pip3 list时也缺少了hcloud模块,所以我使用;
pip3 install hcloud一切都很有魅力。Hetzner服务器是使用ansible剧本创建的。
https://stackoverflow.com/questions/72643801
复制相似问题