This document discusses how to create custom Ansible modules to extend its functionality. It provides examples of Ansible and Puppet built-in modules, and describes how to write a custom module using Python. Key steps include choosing a language, setting up the module file structure and boilerplate code, handling arguments and exceptions, and returning JSON output. The document demonstrates a simple module to look up AWS EC2 instances by tags and return their IDs.
This is a talk about ways Ansible could be extended through dynamic inventory, plugins, modules or API. There was a discussion during meetup and ideas generated are added to the presentation.
Introduction to Ansible - Jan 28 - Austin MeetUptylerturk
This presentation is a fairly brief introduction to ansible including some minor details around WP Engine's implementation, variable precedence, a sample playbook, and some of the core concepts around what makes ansible tick.
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...Simplilearn
This presentation about Ansible will help you understand what is Ansible, why we need Ansible, Ansible architecture, working of Ansible, benefits by using Ansible and you will also see a demo on how to install HTTPD using Ansible. Ansible is an IT engine which automates orchestration, configuration management, and deployment. It is an open source configuration management tool that allows you to implement infrastructure as code. It can also be called as infrastructure as code automation engine that helps you automate provisioning software by applying configurations. Ansible has been included in Fedora distribution of Linux and is also available for Red Hat Enterprise Linux, CentOD, scientific Linux via extra packages for Enterprise Linux.
Below topics are explained in this Ansible presentation:
1. Why Ansible?
2. What is Ansible?
3. Ansible architecture
4. Working of Ansible
5. Benefits of Ansible
6. Demo: Install HTTPD
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands on and interactive approach. The Devops training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
This is a powerpoint presentation that I put together discussing best practices with Ansible, although it more specifically targets ansible playbooks. The topics include content organization, tips for writing playbooks, discussion around idempotency and it's importance, the power of jinja2 within ansible, and finishes with some lessons learned.
This presentation was delivered on July 30th at WP Engine's office for the Austin Ansible MeetUp.
This is a talk about ways Ansible could be extended through dynamic inventory, plugins, modules or API. There was a discussion during meetup and ideas generated are added to the presentation.
Introduction to Ansible - Jan 28 - Austin MeetUptylerturk
This presentation is a fairly brief introduction to ansible including some minor details around WP Engine's implementation, variable precedence, a sample playbook, and some of the core concepts around what makes ansible tick.
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...Simplilearn
This presentation about Ansible will help you understand what is Ansible, why we need Ansible, Ansible architecture, working of Ansible, benefits by using Ansible and you will also see a demo on how to install HTTPD using Ansible. Ansible is an IT engine which automates orchestration, configuration management, and deployment. It is an open source configuration management tool that allows you to implement infrastructure as code. It can also be called as infrastructure as code automation engine that helps you automate provisioning software by applying configurations. Ansible has been included in Fedora distribution of Linux and is also available for Red Hat Enterprise Linux, CentOD, scientific Linux via extra packages for Enterprise Linux.
Below topics are explained in this Ansible presentation:
1. Why Ansible?
2. What is Ansible?
3. Ansible architecture
4. Working of Ansible
5. Benefits of Ansible
6. Demo: Install HTTPD
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands on and interactive approach. The Devops training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
This is a powerpoint presentation that I put together discussing best practices with Ansible, although it more specifically targets ansible playbooks. The topics include content organization, tips for writing playbooks, discussion around idempotency and it's importance, the power of jinja2 within ansible, and finishes with some lessons learned.
This presentation was delivered on July 30th at WP Engine's office for the Austin Ansible MeetUp.
I'm talking about how Ansible helps Backbase establish testing pipeline to ensure the quality of Customer Experience Platform - the leading horizontal portal software. This is done by utilizing the concept of immutable infrastructure to provision on-demand infrastructure use it and the dispose.
Server Check.in case study - Drupal and Node.jsJeff Geerling
Server Check.in is a simple, inexpensive website and server monitor. See how Server Check.in was built, and how it uses Drupal and Node.js together to build an easy-to-use and powerful web application. See more at https://servercheck.in/
Automating Your Daily Tasks with Scripting - RubyConf 2015 TaiwanAdler Hsieh
This talk aims to go through basic scripting skills in Ruby. Participants will have a better understanding in managing their daily tasks with scripting. For example, we can setup automated scripts to delete old files on a daily basis instead of doing it manually. These can be done with Bash, Perl and many other scripting languages, but among of which Ruby is better known for its readability. It is easier to write, maintain, and reuse. It saves some time on system management and allows us to put more focus on the projects.
Ansible training | redhat Ansible 2.5 Corporate course - GOTkeerthi124
Ansible training makes you learn all that is required to provision. redhat Ansible 2.5 Corporate course from India gives best job support by top experts.
For more info visit : https://www.globalonlinetrainings.com/ansible-training
Azure has a new Command Line Interface, the Azure CLI 2.0. This powerful tool provides cross platform provisioning, management, and automation capabilities for Azure services with an easy to understand interface. In this session we will start with the basics and work our way towards complex end to end Azure deployments using the Azure CLI 2.0. Regardless if you work on a Mac, Windows, or Linux system, this session will get you ramped on managing Azure with the CLI 2.0.
Deploying and Managing Red Hat Enterprise Linux in Amazon Web ServicesDLT Solutions
The Federal Cloud First policy mandates that agencies take full advantage of cloud computing benefits to maximize capacity utilization, improve IT flexibility and responsiveness, and minimize cost. But how can you safely and reliably begin to deploy and manage your Red Hat instances at cloud scale? With IT automation, you can more easily deploy and manage your Red Hat instances in the Amazon Web Services (AWS) public cloud.
In this webinar, we’ll demonstrate how to:
Automate the creation of Red Hat Enterprise Linux-based AWS instances
Apply a security baseline to the instances
Deploy and manage an application
Regardless of where you are in the cloud adoption process, leveraging IT automation can help smooth the transition to the cloud. Join the webinar to learn how.
I'm talking about how Ansible helps Backbase establish testing pipeline to ensure the quality of Customer Experience Platform - the leading horizontal portal software. This is done by utilizing the concept of immutable infrastructure to provision on-demand infrastructure use it and the dispose.
Server Check.in case study - Drupal and Node.jsJeff Geerling
Server Check.in is a simple, inexpensive website and server monitor. See how Server Check.in was built, and how it uses Drupal and Node.js together to build an easy-to-use and powerful web application. See more at https://servercheck.in/
Automating Your Daily Tasks with Scripting - RubyConf 2015 TaiwanAdler Hsieh
This talk aims to go through basic scripting skills in Ruby. Participants will have a better understanding in managing their daily tasks with scripting. For example, we can setup automated scripts to delete old files on a daily basis instead of doing it manually. These can be done with Bash, Perl and many other scripting languages, but among of which Ruby is better known for its readability. It is easier to write, maintain, and reuse. It saves some time on system management and allows us to put more focus on the projects.
Ansible training | redhat Ansible 2.5 Corporate course - GOTkeerthi124
Ansible training makes you learn all that is required to provision. redhat Ansible 2.5 Corporate course from India gives best job support by top experts.
For more info visit : https://www.globalonlinetrainings.com/ansible-training
Azure has a new Command Line Interface, the Azure CLI 2.0. This powerful tool provides cross platform provisioning, management, and automation capabilities for Azure services with an easy to understand interface. In this session we will start with the basics and work our way towards complex end to end Azure deployments using the Azure CLI 2.0. Regardless if you work on a Mac, Windows, or Linux system, this session will get you ramped on managing Azure with the CLI 2.0.
Deploying and Managing Red Hat Enterprise Linux in Amazon Web ServicesDLT Solutions
The Federal Cloud First policy mandates that agencies take full advantage of cloud computing benefits to maximize capacity utilization, improve IT flexibility and responsiveness, and minimize cost. But how can you safely and reliably begin to deploy and manage your Red Hat instances at cloud scale? With IT automation, you can more easily deploy and manage your Red Hat instances in the Amazon Web Services (AWS) public cloud.
In this webinar, we’ll demonstrate how to:
Automate the creation of Red Hat Enterprise Linux-based AWS instances
Apply a security baseline to the instances
Deploy and manage an application
Regardless of where you are in the cloud adoption process, leveraging IT automation can help smooth the transition to the cloud. Join the webinar to learn how.
Presentation bei der CodeTalks Developer Conference in Hamburg zum Thema: "Kopf frei für's Produkt - Automatisierung mit Ansible und Jenkins" von LeanIX CTO André Christ und SW Architekt Dr. Daniel Pozzi.
Vom ersten Einrichten einer Maschine bis zum Ausliefern der Anwendung ist es ein weiter Weg, der in einem Startup viele menschliche und technische Ressourcen abverlangt. Neue Kundenwünsche und Skalierung erfordern immer mehr Server, Dienste („best tool for the job“) oder Anwendungsinstanzen, die verwaltet werden wollen.
Der SaaS-Anbieter LeanIX aus Bonn hat den manuellen Prozess in wenigen Wochen gegen eine vollständig automatisierte Provision-, Build- und Deploy-Kette mit ansible und Jenkins getauscht, um den Rücken für die Produktentwicklung frei zu haben.
● Fundamentals
● Key Components
● Best practices
● Spring Boot REST API Deployment
● CI with Ansible
● Ansible for AWS
● Provisioning a Docker Host
● Docker&Ansible
https://github.com/maaydin/ansible-tutorial
Ansible is an open source automation platform, written in Python, that can be used for configuration-management, application deployment, cloud provisioning, ad-hoc task-execution, multinode orchestration and so on. This talk is an introduction to Ansible for beginners, including tips like how to use containers to mimic multiple machines while iteratively automating some tasks or testing.
How to use Ansible to automate your applications in AWS. What is Ansible and why is it different? How to control cloud deployments securely and how to control AWS resources using dynamic inventory and tags.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
- How to use Ansible to automate your applications in AWS.
- What is Ansible and why is it different?
- How to control cloud deployments securely
- How to control AWS resources using dynamic inventory and tags.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
- How to use Ansible to automate your applications in AWS.
- What is Ansible and why is it different?
- How to control cloud deployments securely
- How to control AWS resources using dynamic inventory and tags.
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
The goal of this presentation is to give Drupal new comers some insights about key aspects of developing with Drupal.
The idea is to give the audience some guidelines about good practices of Drupal development along with some tips and, by a simple example application, present the most common and important structures/characteristics of the Drupal API.
Top 50 Ansible Interview Questions And Answers in 2023.pdfDatacademy.ai
Attention all DevOps professionals and enthusiasts! Are you preparing for an upcoming Ansible interview and looking for some guidance on what to expect? Look no further! We have compiled a list of the top 50 Ansible interview questions and answers for 2023 to help you ace your interview. Whether you're a beginner or an experienced Ansible user, these questions will cover all aspects of Ansible and ensure you are fully prepared for any technical challenge that comes your way. So, brush up on your skills and check out our list today! #AnsibleInterviewQuestions #DevOps #TechInterviews
Visit by :-https://www.datacademy.ai/ansible-interview-questions-answers/
Presentation for the talk I gave at Drupal Camp Baltics (2010 september 25th in Riga). The main focus is on the basic concepts behind drupal module development. A short overview of available APIs and examples of the most common hooks are given.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Connector Corner: Automate dynamic content and events by pushing a button
Extending ansible
1. Create Your Own Module
Yan Kurniawan, March 2015
EXTENDING ANSIBLE
2. ABOUT ME
• Cloud Engineer at Flux7 (http://flux7.com), a US-based AWS
Consulting Partner
• Writer of “Ansible for AWS” book
http://leanpub.com/ansible-for-aws
3. ANSIBLE MODULES
• "batteries-included" philosophy
Useful out-of-the-box modules
• Over 200 core modules available
http://docs.ansible.com/modules_by_category.html
10. WRITING CUSTOM MODULE
• Any language (Python, Bash, C++, PHP, clojure, Ruby, etc); the only
requirement is being able to read/write files and write to stdout
• Output of the module should be in JSON format
• Recommended: Python
Boilerplate available; reduce the amount of code required
Arguments are handled automatically
Output is automatically converted to JSON
You can learn from Ansible core modules
https://github.com/ansible/ansible-modules-core
Chance to contribute to the Ansible project
12. THE BOILERPLATE
def main():
module = AnsibleModule(
argument_spec = dict(
arg1 = dict(choices=SOME_CHOICES),
arg2 = dict(required=False)
),
)
# Your code here
# import module snippets
from ansible.module_utils.basic import *
main()
13. DEMO
• A simple module to return Amazon EC2 instance id(s)
using tags as input argument.
• Save the module as instance_lookup in
library/ directory
• Use the return value to start/stop/terminate
instance(s) using Ansible ec2 module.
17. SOME CODES
if region:
try:
ec2 = connect_to_region(region)
except boto.exception.NoAuthHandlerFound, e:
module.fail_json(msg=str(e))
else:
module.fail_json(msg="region must be specified")
instance_ids = []
for tag, value in tags.iteritems():
for instance in ec2.get_only_instances
(filters={'tag:' + tag: value}):
instance_ids.append(instance.id)
20. THE PLAYBOOK
- name: get instance id
instance_lookup:
region: "{{ region }}”
tags:
Name: test01
register: instanceid
- name: start instance
ec2:
region: "{{ region }}"
instance_ids: "{{ instanceid.instance_ids }}"
state: running
wait: yes
when: instanceid is defined
21. MORE RESOURCES
• Module development guideline
http://docs.ansible.com/developing_modules.html
• Boto reference
https://boto.readthedocs.org/en/latest/