Move AWS credentials to their own directory
This commit is contained in:
parent
7406d30191
commit
63c7af0016
2
roles/awscreds/meta/main.yml
Normal file
2
roles/awscreds/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
allow_duplicates: no
|
15
roles/awscreds/tasks/main.yml
Normal file
15
roles/awscreds/tasks/main.yml
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: Set up AWS credentials for root
|
||||
block:
|
||||
- name: Create .aws directory
|
||||
file:
|
||||
path: ~/.aws
|
||||
state: directory
|
||||
- name: Copy AWS credentials
|
||||
copy:
|
||||
src: awscredentials
|
||||
dest: ~/.aws/credentials
|
||||
mode: "0600"
|
||||
become: true
|
@ -1,2 +1,4 @@
|
||||
---
|
||||
allow_duplicates: no
|
||||
dependencies:
|
||||
- role: awscreds
|
||||
|
@ -21,15 +21,6 @@
|
||||
vars:
|
||||
packages:
|
||||
- ansible
|
||||
- name: Create .aws directory
|
||||
file:
|
||||
path: ~/.aws
|
||||
state: directory
|
||||
- name: Copy AWS credentials
|
||||
copy:
|
||||
src: awscredentials
|
||||
dest: ~/.aws/credentials
|
||||
mode: "0600"
|
||||
- name: Assure root .ssh directory
|
||||
file:
|
||||
path: ~/.ssh
|
||||
|
Loading…
Reference in New Issue
Block a user