Skip to content
Snippets Groups Projects
Commit 82d4e9b3 authored by Dónal Cunningham's avatar Dónal Cunningham
Browse files

Purging tabs from YAML files

parent 5ac5b2e3
No related branches found
No related tags found
No related merge requests found
---
- name: Install Apache2 on all webservers
hosts: webservers
sudo: yes # Must be root
sudo: yes # Must be root
tasks:
- name: Install Apache
apt: pkg=apache2 state=latest # httpd if using yum
apt: pkg=apache2 state=latest # httpd if using yum
- name: Generate config file
copy: src=httpd.conf dest=/etc/httpd.conf
- name: Restart Apache
......
---
- name: Install mod_rewrite on all webservers
hosts: webservers
sudo: yes # Gotta be root
sudo: yes # Got to be root
tasks:
- name: Install Apache
apt: pkg=apache2 state=latest
......
---
- name: Copy the relevant files to the target
vars:
source_file: foo.conf
destination_directory: /etc/foo
source_file: foo.conf
destination_directory: /etc/foo
tasks:
- name: "copy foo.conf to server"
copy:
src: {{ source_file }}
dest: {{ destination_directory }}
owner: foo
group: foo
mode: ‘0644’
backup: yes
src: {{ source_file }}
dest: {{ destination_directory }}
owner: foo
group: foo
mode: ‘0644’
backup: yes
......@@ -6,11 +6,11 @@
# If you do it anyway, you will get this error:
# "ERROR! no module/action detected in task."
- name: Set up Apache # Or nginx, or Mongoose
- name: Set up Apache # Or nginx, or Mongoose
hosts: webservers
tasks:
- name: install Apache
- name: generate Apache config file
- name: download Web content to relevant directory
- name: restart Apache
- name: eat cake
\ No newline at end of file
- name: eat cake
......@@ -2,7 +2,7 @@
- name: Set up Apache
hosts: webservers
vars:
http_port: 80
http_port: 80
- name: Set up Apache
hosts: webservers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment