1
设置
我想使用Ansible来配置我的IAM用户,组和权限,但我甚至无法起步。我安装了Ansible的开发分支(2.1.0),并尝试运行文档中示例中显示的简单播放。如何使用ansible创建IAM用户,如文档中所示?
site.yml
# Basic user creation example
tasks:
- name: Create two new IAM users with API keys
iam:
iam_type: user
name: "{{ item }}"
state: present
password: "{{ temp_pass }}"
access_key_state: create
with_items:
- jcleese
- mpython
我跑用下面的命令播放:
$ ansible-playbook site.yml
而且收到以下错误:
错误
ERROR! playbooks must be a list of plays
The error appears to have been in '~/aws_kingdom/site.yml': line 2, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
# Basic user creation example
tasks:
^ here
我去pl由于缺乏对工具书解剖的理解,特别是对于那些实际上没有主机的工具,因为它仅适用于在AWS IAM服务中创建用户,因此无知。
参考
http://docs.ansible.com/ansible/iam_module.html
感谢您的快速回复。这就说得通了。我想知道如何为主机提供概念,因为没有对主机进行更改,但本地似乎有效。 –