Ansible: Training, schools at a glance

to providers
(2)
Infos, tips & tests Video stories
(1)

Are you looking for an Ansible course to become more familiar with this form of automation for applications and IT infrastructure? Are you interested in a seminar, workshop or in this IT area?

Here on the Swiss education portal Ausbildung-Weiterbildung.ch you will find a list of suitable training courses for learning this open source automation tool. With just a few clicks, you can order information documents from individual schools or register for a course.

Download checklists

Checklist «Finding the right further training» » download here

Checklist «Choosing the right school» » download here

Learn Ansible: An open source automation tool for applications and IT infrastructure

Ansible is an open source automation tool for orchestration and general configuration and administration of computers. This form of automation combines software distribution, ad-hoc command execution and configuration management. Network computer management is carried out via SSH and therefore requires no additional software on the system to be managed. The automation of applications and IT infrastructure facilitates, simplifies and accelerates the maintenance of systems or their installation or configuration. This is because administrative tasks can be implemented in a reusable manner.

Depending on its focus, an Ansible training course provides basic knowledge or in-depth know-how for working with Ansible, playbooks as scripts for complex tasks and the modular structure of role concepts. The courses can include the following topics:

  • Basics
  • Automation ideas
  • Architecture
  • Installing and configuring a host
  • Create playbooks - simple or complex
  • Ansible-Role and Ansible-Galaxy
  • Introduction to YAML
  • Automation of applications (e.g. web server)
  • Interfaces to other platforms
  • Introduction to Jinja2 templates
  • Automation of infrastructure components (e.g. Cisco) or 3-tier applications
  • Error handling and dependencies within templates
  • Debugging and testing

Different versions of the course are aimed at beginners in the field of automation, server administrators, platform architects and pre-sales staff in the automation environment. Graduates of the training will know how Ansible can be used in the application development cycle and how it can be tailored to scaled environments and enterprise environments.

Are you interested in an education, further education, seminar, workshop or training course on automation options with Ansible? On the well-known education portal Ausbildung-Weiterbildung.ch you will find an overview of education providers in this IT area. A simple ordering option allows you to request information documents from suitable training providers quickly and without obligation with just a few clicks.

Questions and answers

With an Ansible file, you can manage files with the help of Ansible modules. Files can also be copied, edited, inserted, downloaded or replaced with Ansible. According to the Ansible tutorial, files can be copied from the "Ansible File" directory using the "copy" module. The "template" module, on the other hand, copies the Jinja2 template from the "template" directory to Ansible Playbooks. According to the Ansible tutorial, Ansible Copy is therefore only suitable for copying persistent files such as certificates. The "Template" module, on the other hand, is more suitable for reusable configurations such as virtual host configurations. The Ansible module "Fetch" is suitable for downloading a file from the remote machine to a local Ansible node. According to the Ansible tutorial, the following options are available for editing files with Ansible:

  • Insert several lines into a file with the Ansible module "blockinfile"
  • Insert several lines with the marker options with marker option "insertafter" or "insertbefore"
  • Delete/remove several lines by blocking the surroundings within the markings
  • Insert new line in file with "PermitEmptyPasswords"
  • Remove line from file with the line file module
  • Replacing pattern strings with regular expressions and replacing the module with "Replace"
  • Uncommented configurations with "server tokens"
  • Commentary on the configuration line

According to the Ansible tutorial, file attributes can be set via the file module in Ansible, e.g. via a symlink file or by creating a new directory using the file module. There are therefore numerous ways to manage files with an Ansible file.

 

To get Ansible, the most popular tool for configuration management and infrastructure automation, running on Windows, follow the Ansible documentation for "Ansible Windows". The "Ansible Install" succeeds with Cygwin - a POSIX-compatible environment that can be run on Windows. This is because you can do many things on Windows that you normally do on UNIX-based operating systems. The default installation of Cygwin does not cover Ansible, so you need to select "Download Cygwin" during installation. Using Ubuntu on Windows 10 is also an option.

Ansible is an open source automation tool. It is used for orchestration and general configuration and administration of computers. It combines software distribution, ad-hoc command execution and configuration management. Network computers are managed via SSH, among other things. The advantage of Ansible is that it does not require any additional software on the system to be managed. And modules can be written in any programming language, as they use JSON for output. The system, on the other hand, uses YAML to formulate reusable descriptions of systems. One Ansible example (Ansible Example) is Ansible Galaxy. With Ansible Galaxy, it is even possible to create your own Ansible repositories. The Ansible Galaxy source code published under a free license by Red Hat is the official community hub for sharing Ansible roles. With the Ansible Galaxy open source project, companies can set up their own Galaxy server. This allows you to use the native Ansible client for forwarding m private Galaxy repository. In addition, users and companies can now contribute new features and extensions directly to the Galaxy codebase.

An Ansible Collection can contain various Ansible components: Ansible Roles, Ansible Modules or Ansible Plugins. You can make content available by installing the Ansible Collections (collection of your own Ansible environment). The "Namespace" form prevents naming collisions with Ansible Collections and namespaces have no relation to Ansible Github handles. Ansible Collections are packed and pushed to Ansible Galaxy and can be hosted on any Git respostory - private or public. The namespace is defined in the galaxy.yml metafile. Ansible Galaxy is usually covered in an Ansible course.

Playbooks use a simple descriptive language based on YAML and Jinja templates. Templates can be inherited with Jinja2. Generally valid elements can be defined in a base template. Parts of child templates can be overwritten in so-called "blocks". A specific Ansible template is used for the website. The variables included there in Jinja syntax are then filled in by Ansible when the file is copied to the desired location using the template module. Template files are given the file extension .j2. The Ansible template file and the stylesheet are then used to create an exact folder structure. The following task is similar to restarting the firewall service: If the index file or the stylesheet changes during deployment, nginx can be restarted or the delivered files can be changed during operation. The last task should now set a message as "Message-of-the-day", which is displayed when the server logs in via SSH. Again, the Ansible template module is used to copy the desired file to etc/motd. A motd.j2 template file is therefore added. The ansible_* variables come from the host facts in the same way as the website template. However, this does not apply to webserver_name, as this variable should be different for each server and must therefore be defined accordingly.

Each Ansible module can be written independently and in any programming language. The modules should be idempotent in the sense of an "Ansible loop". This means that even if a process is repeated several times - e.g. when recovering from a failure - the system is always restored to the same state.

It is often necessary to change individual file lines. However, many lineinfile or blockinfile modules are used for this purpose. However, practical experience shows that these modules should not be used if files are to be changed with them. In this case, it is better to use the template or copy module. In particular, to manage not only individual lines, but the entire file. There are two reasons for this:

  • When using lineinfile, regex must often be used. This results in the following problems: The use of regex is often complicated and people who then use playbooks must be familiar with regex.
  • The programmer himself must know and be able to remember that this particular line in this one configuration file is managed by Ansible.

If you manage the entire file with an Ansible template, you can use theansible_managed variable to make it clear that the file is under Ansible control. Another advantage is that you can use a variable for the selinux-state and simply change it on servers where selinux should not be in the enforcing state.

The importance of Ansible for programming is:

  • Ansible is one of the preferred tools for automating processes. This refers to processes that would otherwise take a lot of time and often have to be carried out manually without professional quality control. Ansible offers several advantages over other tools of this type (e.g. Puppet, Chef, SaltStack etc.).
  • Thanks to its minimal features, Ansible is easy to use with consistent efficiency. The system status is described using easy-to-write and read YAML files (= Ansible Playbooks).
  • The tasks are controlled and grouped using playbooks. You write everything in the way you want the system to work. Frequently recurring elements are stored in playbook roles and can therefore be used multiple times.
  • You don't need to install much, because all you need on the system is an SSH server, Ansible Git (Ansible Github) and a current Python installation (a scripting language that comes with every current Linux system).
  • And the learning curve is steep. Ansible helps to retain the knowledge in the configuration (Ansible setup) so that a DevOps successor can simply continue working where they left off at any time. This is because the code serves as documentation and everything is reproducible.

Ansible is a configuration management program. With the help of this program, it is possible to run installation and configuration routines simultaneously on any number of other computers from one computer. The only prerequisite for this is that the user logged on to the tower can log on to the other computers via SSH (SSH key) and, if necessary, obtain SuperUser rights there. However, no additional software needs to be installed on the clients themselves. When Ansible is called, the path of the desired hosts file can be explicitly specified using the "-i hostfile" option. However, if you want Ansible to use the host file in the "~/ansible" directory by default, you can enter the following line in an Ansible shell (or insert it at the end of the configuration file "~/.bashrc or ~/.zshrc").

One advantage of Ansible is that it checks the existing conditions beforehand. Only then are any routines called if required. If, for example, the desired programs have already been installed or the corresponding configuration files have been adapted, no changes are made. Because of such features, Ansible is often used for server administration, as it does not restart an active server service. However, Ansible Service can also be used on standard computers. Docker containers can also be configured with Ansible Docker.

Ansible is part of Red Hat's enterprise IT systems management product group and includes Satellite infrastructure management, CloudForms cloud management and the Red Hat Insights monitoring and troubleshooting service. Ansible Engine provides enterprise-level support for the open source project. Ansible Engine is a stabilized, hardened version of the upstream automation technologies. Ansible Engine includes the central task runner and modules for core functions, networking, community and other areas. Ansible Tower provides a range of management and access control features to extend the capabilities of Ansible Engine. Ansible Tower is a supported Red Hat offering based on the upstream AWX project. The IT operations team can easily control user credentials for managed systems thanks to Role Based Access Control (RBAC). Ansible Tower also includes customizable dashboards and inventory management via a Graphic User Interface (GUI), a notification system and job scheduling. In addition to the GUI, Ansible Tower has its own CLI. Tower users can use its API to integrate Ansible into development, IT and DevOps processes and toolchains. Instance groups and isolated nodes enable precise control over implementations.

"Ansible German - Ansible is an open source orchestration tool. An Ansible playbook is an organized unit of scripts. With Ansible, a master server can configure a slave server - the master connects to the "slave" via SSH and executes predefined tasks. Each Ansible task describes a configuration step, such as installing a package using Ansible Yum. Each task calls a module in the form of Ansible modules that implements the current task (e.g. the yum module). The copy module is used when a file is to be copied. The Ansible systemd module can be used to manage Ansible systemd services. Ansible version 2.7 comes with around 2,100 Ansible modules. Additional modules can also be easily imported. If you want to combine several Ansible tasks, you can use an Ansible Playbook. Ansible Playbook defines server configurations that are managed by the Ansible automation tool. In this Ansible playbook, the hosts key is first used in YAML syntax to define the hosts of the inventory on which the playbook should run. The tasks key is then used to define all the tasks that are to run in this order. In an Ansible course, topics such as Ansible Playbook are usually covered.

Redaktionelle Leitung:

Stefan Schmidlin, Bildungsberatung, Content-Team Modula AG

Quellen

Website des Schweizerischen Sekretariats für Bildung, Forschung und Innovation SBFI , Website www.berufsberatung.ch (offizielles schweizerisches Informationsportal der Studien-, Berufs- und Laufbahnberatung) sowie Websites und anderweitige Informationen der Berufsverbände und Bildungsanbieter.

Erfahrungen, Bewertungen und Meinungen zur Ausbildung / Weiterbildung

Preview of the video «4 Schritte zur richtigen Weiterbildung»

Haven't found the right training or further education yet? Benefit from educational advice now!

Further training is not only important in order to maintain or increase professional attractiveness, investing in training or further training is still the most efficient way to increase the chances of a pay rise.

The Swiss education system offers a wide range of individual training and further education opportunities - depending on your personal level of education, professional experience and educational goals.

Choosing the right educational offer is not easy for many prospective students.

Which training and further education is the right one for my path?

Our education advisory team will guide you through the "education jungle", providing specific input and relevant background information to help you choose the right offer.

Your advantages:

You will receive

  • Suggestions for suitable courses, seminars or training programs based on the information you provide in the questionnaire
  • An overview of the different levels and types of education
  • Information about the Swiss education system

We offer our educational counseling in the following languages on request: French, Italian, English

Register now and concretize your training plans.

Sofort zur richtigen Weiterbildung

Filter by teaching method:
Other (0)
Address:
Hofwiesenstrasse 350
8050 Zürich
AnyWeb Training
(5.5) Excellent 39 39 Ratings (97% )
AnyWeb is the largest Cisco Learning Partner in Switzerland and THE competence center when it comes to Cisco Networking Training, as well as general and specific training and further education in the field of IT network technologies. With us you can attend standard courses, workshops or company courses at a career-enhancing level.

Start your career in networking today!
Strengths: Cisco-certified training of network engineers; instructors qualified by experience from daily project work; excellent public transportation connections in ZH-Oerlikon; No. 1 in Switzerland since 1996.
Region: Aargau, Basel, Bern, Ostschweiz, Zentralschweiz, Zürich
Sites: Zürich
Next start date
Certifications, Memberships, Qualifications:
Cisco Learning
Address:
Kronenstrasse 11
8735 St. Gallenkappel
ExperTeach AG
We support the ICT world with training, certification and consulting services. We offer courses from manufacturers such as Cisco or Trend Micro and in the field of IT management. With our own ExperTeach Networking seminar series, we provide you with technology know-how on all important ICT topics and current industry trends.
Region: Aargau, Basel, Bern, Liechtenstein, Ostschweiz, Tessin, Westschweiz, Zentralschweiz, Zürich
Sites: Zürich, Frankfurt/Dietzenbach, Wien, Düsseldorf, Hamburg, München

Schulen mit zertifizierter Bildungsberatung