August 2015
Intermediate to advanced
168 pages
3h 32m
English
After learning about how to manage environments, let's try it out by refactoring our existing code and create a dev environment. To test it, let's create a variable called "env_name" and change the default page of Nginx to dynamically use this variable and print the environment name. We will then try to override this variable from the environment. Let's take a look at the following steps:
#group_vars/all env_name: default
roles/nginx/tasks/configure.yml file:- name: create home page for default site copy: src=index.html dest=/usr/share/nginx/html/index.html ...
Read now
Unlock full access