20 lines
448 B
YAML
20 lines
448 B
YAML
---
|
|
- name: Update All Packages
|
|
yum:
|
|
name: '*'
|
|
state: latest
|
|
- name: Install Apache
|
|
yum:
|
|
name: httpd
|
|
state: installed
|
|
- name: Create The HTML File
|
|
shell: echo "Hello From The Ansible Challenge" > /var/www/html/index.html
|
|
args:
|
|
executable: /bin/bash
|
|
notify:
|
|
- Reload Apache
|
|
- name: Public IP
|
|
shell:
|
|
cmd: curl http://169.254.169.254/latest/meta-data/public-ipv4
|
|
register: curl
|
|
- debug: var=curl.stdout_lines |