Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Salt Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Salt Cookbook

Salt Cookbook

By : Anirban Saha
3.5 (2)
close
close
Salt Cookbook

Salt Cookbook

3.5 (2)
By: Anirban Saha

Overview of this book

If you are a professional associated with system and infrastructure management, looking at automated infrastructure and deployments, then this book is for you. No prior experience of Salt is required.
Table of Contents (13 chapters)
close
close
12
Index

Managing package repositories

Managing packages is an extremely important and base requirement of infrastructure management. However, to manage packages, we need proper package repositories configured. In this chapter, you will learn about how to efficiently manage package repositories with Salt.

How to do it...

Configure two new minions called salt-minion-centos (with OS as CentOS) and salt-minion-ubuntu (with OS as Ubuntu). Configure the environment grain with the value of staging environment in both the minions:

  1. Create a new state directory called pkg_repo in the staging environment.
  2. Create and edit /opt/salt-cookbook/staging/pkg_repo/init.sls to have the following entries:
    salt-repo:
      pkgrepo.managed:
        {% if grains['lsb_distrib_id'] == "CentOS" %}
        - humanname: CentOS-$releasever - Epel Repo
        - mirrorlist: https://mirrors.fedoraproject.org/metalink?repo=epel- 6&arch=$basearch
        - comments:
            - "#baseurl=http://download.fedoraproject.org/pub...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Salt Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon