Skip to content

slobam11/Nginx.installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Hello all :)

In this exercise I was able to install nginx in an Ansible script.

Ansible Playbook: Install Apache Web Server

This Ansible playbook installs the Nginx Web server on a specified Ubuntu host.

Author Slobodan Milojevic

I created a directory called ansible project with the command mkdir ansibleproject.

In that same directory, I created 3 files.

touch ansible.cfg

touch inventory.init

touch webserver.yml

Here are the images : image image image

image image image image

Descriptiom

#!/bin/bash -So this is an exercise how to install nginx or apache ( in this case nginx ) with ansible automation.


Description

  • Connects to the host at IP 192.168.1.29 using the user sloba.
  • Uses sudo privileges (become: yes).
  • Updates the package cache.
  • Installs the apache2 package to ensure Apache is present.
  1. Make sure you have Ansible installed on your control machine.
  2. Ensure you have SSH access to the target host (192.168.1.29) as user sloba.
  3. I Run the playbook with :

ansible-playbook -i 192.168.1.29, install-apache.yml

Author

Slobodan Milojevic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published