Changes

Jump to: navigation, search

OPS445 Online Lab9

293 bytes added, 13:12, 16 July 2023
Investigation 1: The Ansible Package
= System requirements =
* You must have a control machine and a valid Seneca user account on matrix.senecacollege.ca and an VM assigned to you in myvmlab.senecacollege.ca:** control machine (matrix.senecacollege.caor your Fedora)- run ansible to configure your assigned VM in myvmlab.senecacollege.ca
** managed machine(s) (your vm in myvmlab.senecacollege) - to be managed by the control machine
* You should be able to ssh from matrix.senecacollege.ca your control machine as a regular user to your managed machine without supplying a login password.
* Your account on your managed machine is a sudoer and can run sudo with/without password.
* Has Ansible installed on your control machine.
* Has Python 2.7+ installed on your managed machine(s).
 
= Investigation 1: The Ansible Package =
== Part 1: The Ansible package installed on matrix ==
: You only need to have the "ansible" package on your control VM (i.e: On Fedora, Ansible is provided in the ansible package. matrix)Run: <source lang="bash">dnf install ansible</source>: On Matrix, Ansible is already installed for you.
:* Login to matrix with your Seneca account and change to the directory ~/ops445/lab9
:* Issue the following command to check the version of the "ansible" package: <source lang="bash">
Create an ansible playbook named "config_ops445.yml" using the appropriate modules to perform the following configuration tasks on your assigned VM:
:* update Apache (httpd) installed in the Investigation 2 - Part 2
:* install extra packages repository for enterprise Linux (EPEL):* install 'dos2unix' package if it is not already installed
:* remove 'tree' package
:* set the hostname to your Seneca username (Seneca ID)
:* create a new user with your Seneca_ID with sudo access
:* configure the new user account you created above so that you can ssh to it without password:* setup a directory structure '''using a loop''' for completing and organizing labs as shown below:<source lang="bash">
/home/[seneca_id]/ops445/lab1
/home/[seneca_id]/ops445/lab2
</source>
:* when it's ready, run your playbook
:* in order to test it, log in into the VMwith the newly created user (your Seneca_ID), install the 'tree ' package with sudo, and check the directory structure with the 'tree ' command
:* if everything is correct, capture its output for a successful run of your playbook to a file named "lab9_[seneca_id].txt"

Navigation menu