ansible-playbook-lab-excercise-part-3

Create a playbook where you should install a webserver into 2 OS type(Ubuntu and RHEL) with fact conditioning. and list out a directory which in β€œ/etc” and display such as β€œThis is a directory /file in /etc:-XXXx”To be used Conditiong, looping, regiter and fact variable. There are 2 environment DEV and QA. Both has their own group_vars. Using it, in Dev and QA environment(RHEL/CENTOS) install apache and Dev should run with 80 port and QA should run with 8080 port.

Read more

Ansible playbook

1.Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared in role var file — -name: webserver host:web vars_files: – role-var-file.yml tasks: -name: var include include_vars: role-var-file.yml -name: setup httpd server yum: name: “{{packname}}” state: latest – name: Start service httpd, if not started ansible.builtin.service: name: “{{packname}}” state: started

Read more

Ansible Variable Lab & Excercise – Part 2

Assigment 1 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared in role var file Assigment 2 – Create a playbook and setup a webserver(httpd) and use httpd as a variable declared using prompt. Assigment 3 – Create a playbook and setup a webserver(httpd) and find a list of .txt file in some directory and output using register variables Assigment 4 – Create a playbook and setup a webserver(httpd), copy a index.html and interpolate

Read more

Ansible Variable Lab & Excercise – Part 2

Assigment 1 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared in role var file 2.Assigment 2 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared using prompt Assigment 3 – Create a playbook and setup a webserver(httpd) and find a list of .txt file in some directory and output using register variables Assigment 4 – Create a playbook and setup a webserver(httpd), copy a index.html and interpolate

Read more

ansible-variable-lab-excercise-part-2

Assigment 1 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared in role var file Assigment 2 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared using prompt Assigment 3 – Create a playbook and setup a webserver(httpd) and find a list of .txt file in some directory and output using register variables Assigment 4 – Create a playbook and setup a webserver(httpd), copy a index.html and interpolate

Read more

Ansible Playbook Lab & Excercise – Part 3

Create a playbook where you should install a webserver into 2 OS type(Ubuntu and RHEL) with fact conditioning. and list out a directory which in β€œ/etc” and display such as β€œThis is a directory /file in /etc:-XXXx”To be used Conditiong, looping, regiter and fact variable. There are 2 environment DEV and QA. Both has their own group_vars. Using it, in Dev and QA environment(RHEL/CENTOS) install apache and Dev should run with 80 port and QA should run with 8080 port.

Read more

Why Ansible

Assignment 1 What is Ansible? Ansible is a configuration management for the server. Why Ansible? Easy to Learn Platform independent Idempotent Continuous deployment. Network Automation. Configuration Management. Architecture of Ansible:

Read more

Ansible Playbook Exercises

https://www.devopsschool.com/blog/ansible-playbook-lab-excercise-part-2/ To run the playbook: Playbook Variables Precedence of Variables Command Line variable takes precedence over all other. Variables using task include takes precedence over all, except command line variable. External variables take precedence over variable prompt. Variable using prompt takes precedence over embedded variables.

Read more
1 49 50 51 52 53 332