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