blob: 33a5ce2ab9c3fcfa9f692322ff50f133d05e99b3 [file] [log] [blame]
---
- hosts: '{{ hosts }}'
tasks:
- name: Install system packages
become: yes
yum:
name: '{{ item }}'
state: present
with_items:
- elasticache-auto-discovery
when: ansible_os_family | lower == 'redhat'
- name: Update .bashrc with aws_access_key
become: no
lineinfile:
backup: yes
dest: ~/.bashrc
state: present
line: 'export AWS_SECRET_ACCESS_KEY={{ aws_secret_key }}'
when: aws_access_key is defined and update_env is defined and update_env
- name: Update .bashrc with aws_secret_key
become: no
lineinfile:
backup: yes
dest: ~/.bashrc
state: present
line: 'export AWS_ACCESS_KEY_ID={{ aws_access_key }}'
when: aws_secret_key is defined and update_env is defined and update_env
- name: Update .bashrc with aws_region
become: no
lineinfile:
backup: yes
dest: ~/.bashrc
state: present
line: 'export AWS_REGION={{ aws_region }}'
when: aws_secret_key is defined and update_env is defined and update_env