【发布时间】:2021-08-25 17:27:05
【问题描述】:
我想知道是否有人可以帮助我?我正在尝试使用 ansible 配置数据库 rds。 我已经创建了这个,当我尝试执行时没有任何反应:
- name: create-rds-intance
hosts: localhost
connection: local
gather_facts : false
tasks:
- name: provision oracle rds intance
rds:
command: create
region: us-west-1
instance_name: my-db
db_engine: oracle-se
size: "10"
instance_type: db.m3.xlarge
username: root
password: "password"
tags:
environment: staging
当我执行时,我什么都没有,而且我不知道如何调查正在发生的事情......
$ ansible-playbook first-playbook-1.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [create-rds-intance] **************************************************************************************************************
TASK [provision oracle rds intance] ****************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to create instance: "}
PLAY RECAP *****************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
有没有人有一个非常简单的例子? 另外,我想知道是否可以在创建 rds 实例后立即执行 SQL 脚本?
问候,
【问题讨论】:
-
你运行的是什么版本的ansible?
-
您好,``` $ ansible --version ansible 2.10.3 配置文件 = 未配置模块搜索路径 = [u'/home/.../.ansible/plugins/modules', u '/usr/share/ansible/plugins/modules'] ansible python 模块位置 = /usr/lib/python2.7/site-packages/ansible 可执行位置 = /usr/bin/ansible python 版本 = 2.7.18(默认, 2020 年 8 月 27 日,21:22:52) [GCC 7.3.1 20180712 (Red Hat 7.3.1-9)] ```
标签: amazon-web-services ansible boto3 boto