Giter Site home page Giter Site logo

akamalov / ansible-aws-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from servers-for-hackers/ansible-aws-example

0.0 3.0 0.0 120 KB

Example Ansible role to add AWS tools and a PostgreSQL database backup script+cron task

Shell 100.00%
aws ansible

ansible-aws-example's Introduction

Role Name

Installs AWS toolset and a script to backup a PostgreSQL database. You should provide only enough access to your IAM user to upload to the bucket of your choice.

An example policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1622959131123",
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": [
        "arn:aws:s3:::your-bucket-name/*"
      ]
    }
  ]
}

Role Variables

Just the AWS config file needs:

  • aws_access_key_id
  • aws_secret_access_key
  • region
  • output

As well as items for the backup script:

  • bucket_name
  • db_name

This assumes PostgreSQL is installed and the script is run as superuser (and system user) postgres.

Dependencies

Requires "anisble-pgsql-example" repository, which ensures the postgres user exists on the system.

ansible-aws-example's People

Contributors

fideloper avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.