ansible: warum sucht es nach vultr.ini datei?

396
Alex

Ich habe das folgende Playbook erstellt, um eine Vultr-Maschine zu erstellen. Ich verwende das Vultr-Modul von Ansible und habe alle notwendigen Parameter eingestellt;

---  # Ansible Blocks - hosts: 127.0.0.1 # gather_facts: False connection: local tasks:  - block: - name: List root local_action: module: vr_server name: "myserver" os: CentOS 7 x64 plan: 1024 MB RAM,25 GB SSD,1.00 TB BW region: Amsterdam api_key: "242HXXXXXXC3HGGXPSZTK7ILY4QUEC5KN555" api_account: "john"  rescue: - name: Only run when a task inside the block throws an error. debug: msg="Something went wrong."  always: - name: Always run. debug: msg="Regardless of what happened above, we're done with this block!"  ... 

Wenn ich es jedoch starte, erhalte ich die folgende Fehlermeldung:

fatal: [127.0.0.1 -> localhost]: FAILED! => {"changed": false, "msg": "Config file not found. Tried : /home/john/.vultr.ini, /home/john/automation/utils/ansible-vultr/core_vultr/vultr.ini"} 

Es sieht so aus, als suche es nach vultr.ini. Warum ist das so? Was muss ich in die vultr.ini-Datei einfügen?

Die Version von Ansible ist 2.5.0 und läuft auf Ubuntu 14.04.

0

1 Antwort auf die Frage

0
Harold Schreckengost

Anscheinend ist dieser Link genau das, wonach Sie suchen: https://www.renemoser.net/blog/2018/03/18/begin-vultr-with-ansible/

Insbesondere möchten Sie dieses Bit:

[default] key = <your api key>