Ansible with AWS Parameter store

0 votes

I have my AWS parameter store configuration something like this:

I would like to add these parameters into my playbook. Anyone knows how to?

- name: Airflow
  rabbitmq_user:
    user: airflow
    password: password
    state: present
    force: yes
  become: yes
  become_method: sudo
  become_user: root
  register: airflow_dbsetup
  notify:
    - restart rabbitmq-server
Mar 24 in Ansible by Dipti
33 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Dipti, have a look at the aws_ssm module provided by ansible. You can try something like this:

- name: Airflow
  rabbitmq_user:
    user: "{{ lookup('aws_ssm', 'rabbitmq_user', region='us-east-1') }}"
    password: "{{ lookup('aws_ssm', 'rabbitmq_password', region='us-east-1') }}
    state: present
    force: yes
  become: yes
  become_method: sudo
  become_user: root
  register: airflow_dbsetup
  notify:
    - restart rabbitmq-server
answered Mar 24 by Rhea

Related Questions In Ansible

0 votes
2 answers

Issue creating AWS VPC with Ansible

You can use the details given in ...READ MORE

answered Aug 16, 2018 in Ansible by Priyaj
• 56,120 points
117 views
0 votes
1 answer

How to use Ansible git module pull a branch with local changes?

You cannot achieve it using the git ...READ MORE

answered Jul 9, 2018 in Ansible by Atul
• 10,200 points
732 views
0 votes
1 answer

Ansible iterate over hash with condition

Your when statement is wrong. you either split ...READ MORE

answered Jul 23, 2018 in Ansible by Kalgi
• 35,800 points
121 views
0 votes
1 answer

Testing server response with timeout using ansible

Got it working using wait_for and until ...READ MORE

answered Aug 7, 2018 in Ansible by Atul
• 10,200 points
127 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Create Network Load Balancer on AWS using Ansible

Hey @Neha, you can create NLB using ...READ MORE

answered Mar 24 in Ansible by Arc
17 views
0 votes
1 answer

Playbook to get my current IP - Ansible and AWS

Hey Komal, that's pretty simple. Try this: - ...READ MORE

answered Mar 24 in Ansible by Aarohi
22 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.