-
Notifications
You must be signed in to change notification settings - Fork 8
/
aws-vault.yml
42 lines (36 loc) · 1.23 KB
/
aws-vault.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- name: "aws-vault download & install"
get_url:
url: "https://github.com/99designs/aws-vault/releases/download/v6.3.1/aws-vault-linux-amd64"
dest: "/usr/local/bin/aws-vault"
checksum: "sha256:84cfab75012eb272add8b09cb2d295941b977cf2bf58b3fb3caa4c4adac6f17f"
mode: '0755'
become: true
- name: "aws-vault - Add wsl-open.sh to /usr/local/bin"
get_url:
url: "https://raw.githubusercontent.com/4U6U57/wsl-open/master/wsl-open.sh"
dest: "/usr/local/bin/wsl-open.sh"
checksum: "sha256:5c96764bcbc3bdc995d5f8100f33d2586e8cbb7d594848dc60ab9b6a012b5a6c."
mode: '0755'
become: true
- name: "aws-vault - Symlink xdg-open -> wsl-open.sh"
file:
src: "/usr/local/bin/wsl-open.sh"
path: "/usr/local/bin/xdg-open"
state: link
become: true
- name: "aws-vault - set completions in .bashrc"
lineinfile:
path: '${HOME}/.bashrc'
state: present
line: 'eval "$(aws-vault --completion-script-bash)"'
- name: "aws-vault - set backend to file"
lineinfile:
path: '${HOME}/.bashrc'
state: present
line: 'export AWS_VAULT_BACKEND=file'
- name: "aws-vault - export AWS_SESSION_TOKEN_TTL"
lineinfile:
path: '${HOME}/.bashrc'
state: present
line: 'export AWS_SESSION_TOKEN_TTL=10h'