0% found this document useful (0 votes)
91 views15 pages

15 - Ansible Checklist

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/null_resource_module.html New Modules used: - https://www.terraform.io/docs/provisioners/ansible.html - https://www.terraform.io/docs/language/resources/provisioners/local-exec.html - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/wait_for_module.html - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/null_resource_module.html Dynamic Inventory ❏ Watched video Useful Links

Uploaded by

ketaw53000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views15 pages

15 - Ansible Checklist

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/null_resource_module.html New Modules used: - https://www.terraform.io/docs/provisioners/ansible.html - https://www.terraform.io/docs/language/resources/provisioners/local-exec.html - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/wait_for_module.html - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/null_resource_module.html Dynamic Inventory ❏ Watched video Useful Links

Uploaded by

ketaw53000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Module Checklist

Configuration Management
with Ansible

By Techworld with Nana


Video Overview
★ Introduction to Ansible
★ Install Ansible
★ Setup Managed Servers
★ Ansible Inventory
★ Add EC2 Instances to Inventory
★ Managing Host Key Checking
★ Introduction to Ansible Playbook
★ Ansible Modules Overview
★ Ansible Collections
★ Project: Automate Node App Deployment - Part 1
★ Project: Automate Node App Deployment - Part 2
★ Project: Automate Node App Deployment - Part 3
★ Variables in Ansible
★ Project: Automate Nexus Deployment - Part 1
★ Project: Automate Nexus Deployment - Part 2
★ Configure Git & Default Inventory Location
★ Project: Ansible & Docker - Part 1
★ Project: Ansible & Docker - Part 2
★ Project: Ansible Integration in Terraform
★ Dynamic Inventory
★ Project: Automate Kubernetes Deployment
★ Ansible Integration in Jenkins - Part 1
★ Ansible Integration in Jenkins - Part 2
★ Ansible Integration in Jenkins - Part 3
★ Structuring Playbooks with Ansible Roles
Video Overview

Main Demo Project

Git Project https://gitlab.com/nanuchi/ansible-learn

Other Repos used in this module

Terraform Project https://gitlab.com/nanuchi/terraform-learn/-/tree/feat


ure/ansible

Java Maven Project https://gitlab.com/nanuchi/java-maven-app/-/tree/fea


ture/ansible

Nodejs Project https://gitlab.com/devops-bootcamp3/simple-nodejs

Java Mysql Project https://gitlab.com/devops-bootcamp3/bootcamp-java


-mysql/-/tree/ansible
Check your progress... 1/12

Introduction to Ansible

❏ Watched video

Install Ansible
❏ Watched video
❏ Demo executed - Install Ansible

Useful Links:

● Installation Guide:
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html

Setup Managed Servers


❏ Watched video
❏ Demo executed - Create Droplets on DigitalOcean

Ansible Inventory
❏ Watched video
❏ Demo executed
❏ Hosts file created
❏ Pinged servers with Ansible command

Add EC2 Instances to Inventory


❏ Watched video
❏ Demo executed
Check your progress... 2/12

Managing Host Key Checking

❏ Watched video
❏ Demo executed
❏ Added to known_hosts and authorized_keys
❏ Disabled Host Key Checking

Introduction to Ansible Playbook


❏ Watched video
❏ Demo executed
❏ Written simple Playbook
❏ Executed Playbook

Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.ht
ml
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/service_modul
e.html
- Automatically executed by Ansible:
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/gather_facts_
module.html
Check your progress... 3/12

Ansible Modules Overview


❏ Watched video

Useful Links:

- Modules Index for Ansible Version 2.9


https://docs.ansible.com/ansible/2.9/modules/modules_by_category.html

Ansible Collections

❏ Watched video

Useful Links:

- Collection Index:
https://docs.ansible.com/ansible/latest/user_guide/collections_using.html
- Ansible Collections - Version 2.10 Changes:
https://github.com/ansible-collections/overview
- Ansible Galaxy: https://galaxy.ansible.com/
- Developing own Collections:
https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html
Check your progress... 4/12

Project: Automate Node App Deployment - Part 1

❏ Watched video
❏ Demo executed
❏ Created DigitalOcean Droplet
❏ Adjusted hosts file
❏ Written Play “Install node and npm”
❏ Written Play “Deploy nodejs app”

Useful Links:

- Node Project: https://gitlab.com/devops-bootcamp3/simple-nodejs

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html

Project: Automate Node App Deployment - Part 2

❏ Watched video
❏ Demo executed
❏ Written Play “Deploy nodejs app”

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/community/general/npm_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html
- https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debug_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/shell_module.html
Check your progress... 5/12

Project: Automate Node App Deployment - Part 3

❏ Watched video
❏ Demo executed
❏ Written Play “Create new linux user for node app”
❏ Adjusted Play “Deploy nodejs app”

Useful Links:

● Privilege Escalation with become


https://docs.ansible.com/ansible/latest/user_guide/become.html

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html

Variables in Ansible

❏ Watched video
❏ Demo executed

Useful links:

- https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html
Check your progress... 6/12

Project: Automate Nexus Deployment - Part 1

❏ Watched video
❏ Demo executed
❏ Created DigitalOcean Droplet
❏ Adjusted hosts file
❏ Written Play “Install java and net-tools”
❏ Written Play “Download and unpack Nexus installer”

Useful Links:

- Conditionals in Ansible:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/get_url_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/find_module.html
- https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/stat_module.html

Project: Automate Nexus Deployment - Part 2

❏ Watched video
❏ Demo executed
❏ Written Play “Create nexus user to own nexus folders”
❏ Written Play “Start nexus with nexus user”
❏ Written Play “Verify nexus running”

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/group_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/blockinfile_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pause_module.html
Check your progress... 7/12

Configure Git & Default Inventory Location

❏ Watched video
❏ Demo executed

Project: Ansible & Docker - Part 1

❏ Watched video
❏ Demo executed
❏ Created EC2 Instance with Terraform
❏ Adjusted hosts inventory file
❏ Written Play “Install python3 and docker”
❏ Written Play “Install docker-compose”
❏ Written Play “Start docker daemon”
❏ Written Play “Add ec2-user to docker group”
❏ Refactored the Playbook

Useful Links:

● Git Repo from Terraform Module:


https://gitlab.com/nanuchi/terraform-learn/-/tree/feature/deploy-to-ec2
● Install docker-compose:
https://gitlab.com/nanuchi/java-maven-app/-/blob/feature/sshagent-terraform/terraform/e
ntry-script.sh
● Jinja2 Templating Language: https://palletsprojects.com/p/jinja/

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pipe_lookup.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/meta_module.html
Check your progress... 8/12

Project: Ansible & Docker - Part 2

❏ Watched video
❏ Demo executed
❏ Adjusted 1st Play to “install docker python module”
❏ Written Play “Test docker pull”
❏ Written Play “Start docker containers”
❏ Executed Playbook on new server
❏ Created new user and adjusted plays to make the playbook more general-purpose

Useful Links:
● You can use the docker-compose.yaml file from this project:
https://gitlab.com/devops-bootcamp3/bootcamp-java-mysql/-/tree/ansible
● Interactive Prompts:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_prompts.html

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/community/docker/docker_image_mod
ule.html
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html
- https://docs.ansible.com/ansible/latest/collections/community/docker/docker_login_modul
e.html
- https://docs.ansible.com/ansible/latest/collections/community/docker/docker_compose_m
odule.html
Check your progress... 9/12

Project: Ansible Integration in Terraform

❏ Watched video
❏ Demo executed
❏ Adjusted Terraform configuration file to execute ansible playbook
❏ Created new Ansible Playbook for Terraform integration
❏ Written Play “Wait for ssh connection”
❏ Used“null_resource” in Terraform configuration file

Useful Links:
● Ansible part of the Terraform project:
https://gitlab.com/nanuchi/terraform-learn/-/tree/feature/ansible
● TF Provisioner:
https://www.terraform.io/docs/language/resources/provisioners/syntax.html
● TF Null Resource:
https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/wait_for_module.html
Check your progress... 10/12

Dynamic Inventory

❏ Watched video
❏ Demo executed
❏ Terraform - Created EC2 Instances
❏ Written plugin configuration for aws_ec2
❏ Adjusted TF config for public DNS assignment
❏ Adjusted Ansible playbook and ansible.cfg to use dynamic hosts from AWS
❏ Added a 4th server and re-executed Ansible playbook
❏ Targeted only specific servers in your AWS region (filter + keyed_groups)

Useful Links:

● Working with Dynamic Inventory:


https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html
● Git Repo from Terraform Module:
https://gitlab.com/nanuchi/terraform-learn/-/tree/feature/deploy-to-ec2
● Inventory Plugins:
https://docs.ansible.com/ansible/latest/plugins/inventory.html#inventory-plugins
● EC2 Inventory Source:
https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html
● Ansible-inventory command:
https://docs.ansible.com/ansible/latest/cli/ansible-inventory.html
Check your progress... 11/12

Project: Automate Kubernetes Deployment

❏ Watched video
❏ Demo executed
❏ Terraform - Created K8s cluster
❏ Written Play “Deploy app in new namespace”
❏ Set kubeconfig environment variable

Useful Links:

● TF script for EKS creation: https://gitlab.com/nanuchi/terraform-learn/-/tree/feature/eks

New Modules used:

- https://docs.ansible.com/ansible/latest/collections/community/kubernetes/k8s_module.ht
ml

Project: Ansible Integration in Jenkins - Part 1

❏ Watched video
❏ Demo executed - Preparation
❏ Created Droplet on DO (for Ansible Control Node)
❏ Configured Droplet as Ansible Control Node (Install Ansible etc.)
❏ Created 2 EC2 Instances (for Ansible Managed Nodes)

Useful Links:

● Java Maven App: https://gitlab.com/nanuchi/java-maven-app


Check your progress... 12/12

Project: Ansible Integration in Jenkins - Part 2

❏ Watched video
❏ Demo executed - Jenkins Pipeline
❏ Installed necessary Jenkins Plugins
❏ Configured Credentials for DO Droplet (Private Key for Ansible Server &
EC2 Managed Servers)
❏ Written Jenkinsfile
❏ Created Pipeline in Jenkins

Project: Ansible Integration in Jenkins - Part 3

❏ Watched video
❏ Demo executed - Optimizations

Ansible Roles

❏ Watched video
❏ Demo executed
❏ Created Roles
❏ Used Roles in Playbook
❏ Created EC2 servers with Terraform
❏ Executed Ansible Playbook

Useful Links:

● Official Doc:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html
● Variable Precedence:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#vari
able-precedence-where-should-i-put-a-variable

You might also like