Changes

Jump to: navigation, search

OPS435 Online Lab9

577 bytes added, 07:53, 1 April 2021
Lab 9 Sign-off (Show Instructor)
[[Category:OPS435]][[Category:rchan]][[Category:OPS435 Lab]]
 
= Under Review and update, will be released on March 29, 2021 =
= Objective =
:# Confirm and review the Ansible package installed on matrix.senecacollege.ca
Name: motd-play.yml
<pre>
[raymond.chan@mtrx-node02pd lab9]$ cat motd-play.yml
---
- name: update motd file hosts: 192.168.99.153jkwok user: rootinstructor become: yes
vars:
apache_version: 2.6
motd_warning: 'WARNING: use user by ICT faculty/students only.'
testserver: yes
tasks:
- name: setup a MOTD
copy:
dest: /etc/motd
content: "{{ motd_warning }}"
 
</pre>
Sample Run:
<pre>
[rchanraymond.chan@centos7 playbooksmtrx-node02pd lab9]$ ansible-playbook -i hosts --private-key id_rsa -b motd-play.yml
PLAY [192.168.99.153update motd file] *******************************************************************
TASK [Gathering Facts] ********************************************************************ok: [192.168.99.153jkwok]
TASK [setup a MOTD] ***********************************************************************changed: [192.168.99.153jkwok]
PLAY RECAP ********************************************************************************192.168.99.153 : jkwok ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
</pre>
Try to run it the 2nd time and pay attention to the result. What conclusion can you draw?
== Part 2: A playbook to install and start Apache Server ==
</pre>
= Investigation III: Using Playbook to configure an OPS435 Linux VM machine =
: Assume you have just installed the latest version of CentOS 7.x on a VM with GNOME Desktop. You need to configure it so that you can use it for doing the Labs for OPS435. The : Study the documentation and examples of following ansible modules::* copy:* file :* hostname:* template:* user:* yum Create an ansible playbook using the appropriate modules to perform the following configuration tasks need to be done on that your assigned VM:
:* update all the packages installed on the VM
:* install extra packages repository for enterprise Linux
= Lab 9 Sign-off (Show Instructor) =
For the Winter 2021 Semeter, this lab is optional and if you complete and submit this lab by April 7, 2021, you could get a maximum bonus of 2%. Please confirm this with your instructor.
== Have the following items ready to show your instructor: ==
: * The Ansible playbook called "config_ops435.yaml" for configuring the VM mentioned in Lab 1.
1,760
edits

Navigation menu