2016-07-31 11 views
0

私はansible使用してAWSにキネシスストリームを作成しようとしていますし、私は私の修正スニペットkinesis.ymlは、特定の領域にキネシスストリームを作成するためにここにあるhere可能なモジュールを使用してaws kinesisストリームを作成できません...!

からいくつかの例のモジュールスニペットを得た:

- hosts: localhost 
    connection: local 
    gather_facts: no 
    vars: 
#aws region to create kinesis 
    region: ap-south-1 
    tasks: 
    - name: Set up Kinesis Stream with 2 shards and wait for the stream to become ACTIVE 
     kinesis_stream: 
       name: test-stream 
       shards: 2 
       wait: yes 
       wait_timeout: 600 
       region: "{{ region }}" 
     register: test_stream 

私は思います私は途中でアップmessudいくつかの場所我々はキネシスモジュールを定義することができますし、私は以下のエラーを得た:私はのbotoで私のAWSコンソールアクセスキーを設定している

centos]# ansible-playbook -vvvv kinesis.yml 
    No config file found; using defaults 
    ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path. 

    The error appears to have been in '/home/centos/kinesis.yml': line 4, column 7, but may 
    be elsewhere in the file depending on the exact syntax problem. 

    The offending line appears to be: 

     tasks: 
     - name: Set up Kinesis Stream with 2 shards and wait for the stream to become ACTIVE 
     ^here 

。 特定のaws地域でキネシスを作成するために、可能なプレイブックを定義する正しい方法があることを教えてください。

答えて

-1

最後に私はaws cliを使って実現しました。また、もう少し詳しく調べるために、コマンドラインオプションもサポートしています。それで、私たちは不可能な人と一緒に働くaws cliコマンドを渡すことができます。我々はすぐに私たちのAnsible脚本によりAWSの機能/サービスを追加することができ、このAWS CLIのアプローチを使用した

--- 
- hosts: localhost 
    connection: local 
    gather_facts: no 
    vars: 
    streamName: test-stream 
    shardCount: 2 
    tasks: 
    - name: Create Kinesis Sream 
     command: aws kinesis create-stream --stream-name {{streamName}} --shard-count {{shardCount}} 
     register: kinesis 

は、ここに私のサンプルモジュールスニペットです。

1

kinesis_streamはまだ含まれていません。つまり、それはAnsibleの一部ではありません。モジュールやリビジョンが実際にAnsibleで出荷されるまでにはしばしば時間がかかります(彼らはかなり邪悪ではありません)。

このモジュールを使用するには、ローカルlibrary/フォルダに配置する必要があります。

+0

どこからそのライブラリを入手できますか?参照リンクがある場合は、共有してください。ありがとう –

+0

[ここにあります](https://github.com/ansible/ansible-modules-extras/pull/1901)。あなたはおそらく、より高いレベルの有能な専門知識なしでそれを使用すべきではありません。 – tedder42

+0

はい私は今探検しています。私は来るべき日にそれを実現することを願っています! :)ありがとう –

関連する問題