MGMT NODE : 1 x Ubuntu - AWS 3.106.117.65
CLIENT NODE : 1 x Ubuntu - OCI 152.67.112.169 (Client node)
Using playbook from previous lab - Apache install
inventory.yml
all:
children:
clients:
hosts:
UBUNTU-OCI:
ansible_host: 152.67.112.169
ansible_user: ubuntu
ansible_ssh_private_key_file: ~/.ssh/ssh-key-2025-01-10.key
playbook.yml
---
- name: Install Apache on UBUNTU-OCI
hosts: clients
become: yes
tasks:
- name: Update apt cache
apt:
update_cache: yes
- name: Install Apache
apt:
name: apache2
state: present
- name: Ensure Apache service is running
service:
name: apache2
state: started
enabled: yes

