Use parameters stored in aws parameter store in ansible playbook

0 votes
I have a few parameters stored in AWS parameter store. Now how do I use those parameters in my ansible playbook?
Jul 22 in Ansible by Abdullah
102 views

1 answer to this question.

0 votes

Use aws_ssm module for this purpose:

- name: example
  rabbitmq_user:
    user: "{{ lookup('aws_ssm', 'user', region='us-east-1') }}"
    password: "{{ lookup('aws_ssm', 'password', region='us-east-1') }}
    state: present
    force: yes
  become: yes
  become_method: sudo
  become_user: root
  register: example
  notify:
    - restart rabbitmq-server
answered Jul 22 by Vishnu

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Ansible with AWS Parameter store

Hey @Dipti, have a look at the ...READ MORE

answered Mar 24 in Ansible by Rhea
165 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,890 points
1,791 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Pass sudo password while executing Ansible playbook

Hey @Bob, try something like this: ansible-playbook playbook.yml ...READ MORE

answered Jul 22 in Ansible by Akash
130 views