Ansible create an IAM user with a group and with administrator privilege

Hi,

Can someone please help me in creating an IAM user with a group and with administrator privilege

Thanks,

Hi

Do you mean

  • you want to add a user which name is IAM ?
  • the user belong to a group ? ( which name is group name )
  • with adminisrator privilege, sudo users?

Adithya Khamithkar於 2015年11月28日星期六 UTC-6上午7時23分12秒寫道:

Yes I want to add a user in IAM the user name will be a variable that I’ll pass from my vars file. And I want that user to be added in that group called administrator.

Hi, Is something like this

cat test_group_user.yml

  • name: Test group and user module

hosts: testserver

vars:

username: sakanamax

tasks:

  • name: Add administrator group

sudo: True

group: name=administrator state=present

  • name: Add user sakana and add to administrator group

sudo: True

user: name={{ username }} group=administrator

Adithya Khamithkar於 2015年11月28日星期六 UTC-6下午10時53分11秒寫道:

Thia is for adding a user on linux. I want to add an IAM user on AWS. :slight_smile:

Sorry for misunderstand :slight_smile:
<(_ _)>

I don’t use AWS, I think other one could help you

Adithya Khamithkar於 2015年11月29日星期日 UTC-6下午3時40分50秒寫道: