Skip to content
Snippets Groups Projects
Commit 96151394 authored by debora.benedetto@hpe.com's avatar debora.benedetto@hpe.com
Browse files

Upload New File

parent ac8fd0a2
No related branches found
Tags 6.0 6.0.0
No related merge requests found
---
- hosts: 16.0.0.1
gather_facts: no
become: yes
vars:
ansible_ssh_private_key_file: "/home/user1/.ssh/openstack.key"
ansible_ssh_user: "ubuntu"
tasks:
- name: Update repositories
apt:
update_cache: yes
- name: Install nginx
package:
name: nginx
- name: Start nginx
service:
name: nginx
enabled: yes
state: started
- name: Set attributes
set_stats:
data:
site_config_dir: /etc/nginx/conf.d
- name: Install sample site
copy:
dest: ""
content: |
<!doctype html>
<html lang="en">
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Sample web page</h1>
<p>With little content ;)</p>
</body>
</html>
with_items:
- /var/www/html/index.html
- /usr/share/nginx/html/index.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment