version 1.2
This commit is contained in:
4
ansible/ansible.cfg
Normal file
4
ansible/ansible.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
[defaults]
|
||||
inventory = inventory.ini
|
||||
private_key_file = ~/.ssh/lenape_key
|
||||
host_key_checking = False
|
3
ansible/inventory.ini
Normal file
3
ansible/inventory.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
[all]
|
||||
vm1 ansible_host=52.179.209.136 ansible_user=lenape
|
||||
vm2 ansible_host=52.167.139.93 ansible_user=lenape
|
20
ansible/playbook.yml
Normal file
20
ansible/playbook.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Install NGINX on all VMs
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Update APT cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install NGINX
|
||||
apt:
|
||||
name: nginx
|
||||
state: present
|
||||
|
||||
- name: Ensure NGINX is running
|
||||
service:
|
||||
name: nginx
|
||||
state: started
|
||||
enabled: true
|
Reference in New Issue
Block a user