Skip to content

Instantly share code, notes, and snippets.

@ariestiyansyah
Last active February 20, 2016 04:28
Show Gist options
  • Save ariestiyansyah/1f0e4c56820528c5cf83 to your computer and use it in GitHub Desktop.
Save ariestiyansyah/1f0e4c56820528c5cf83 to your computer and use it in GitHub Desktop.
AWS IAM using ansible
--- # AWS IAM MODULE
- hosts: localhost
connection: local
remote_user: test
become: yes
gather_facts: no
var_files:
- files/awscreds.yml
tasks:
- name: Create IAM Users
iam:
aws_access_key: "{{ aws_id }}"
aws_secret_key: "{{ aws_key }}"
region: "{{ aws_region }}"
iam_type: user
name: "{{ item }}"
state: present
password: "password"
access_key_state: create
with_items:
- user1
- user2
register: output
name: show JSON Results
- debug: var=output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment