Skip to content

OT-OSM/mongo_kernel_patching

Repository files navigation

Opstree Solutions

Opstree Solutions

Osm Patch Mongo Role

In this ansible role we can Patch and reboot the Mongo Cluster for new kernel update.

Supported OS

  • Centos:7

Requirements

The below plugin is needed to run this ansible role.

  • community.mongodb.mongodb_shell
ansible-galaxy collection install community.mongodb

Inventory


An example inventory could be like this:-

[mongo_primary]
3.144.137.10

[mongo_secondary]
18.221.249.129
13.59.139.133

[mongo:children]
mongo_primary
mongo_secondary

[mongo:vars]
ansible_user=ec2-user

Example Playbook

---
- name: This is patching mongo role
  hosts: all 
  become: yes
  roles: 
    - role: mongo_patching

Usage

Secrets.yml is required to run this ansible role. To Create

 ansible-vault encrypt_string 'USERNAME' --name 'login_user' >> secrets.yml
 ansible-vault encrypt_string 'PASSWORD' --name 'login_password' >> secrets.yml

To execute role

ansible-playbook -e "@secrets.yml" -i hosts sites.yml --ask-vault-pass 

Future Proposed Changes

  • Focus on some role Enhancement
  • Patch mongo cluster for ubuntu distribution.

Reference

Guid to patch mongo cluster

Contributors

Kritarth pant

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published