From 82d4e9b38540a623609bf977cfc6fd1ace35d2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=B3nal=20Cunningham?= <donal.cunningham@heanet.ie> Date: Wed, 8 Dec 2021 20:43:16 +0000 Subject: [PATCH] Purging tabs from YAML files --- Section2/playbooks/install_Apache.yaml | 4 ++-- .../playbooks/install_Apache_with_handlers.yaml | 2 +- Section2/playbooks/playbook_with_Jinja2.yaml | 16 ++++++++-------- Section2/playbooks/simple_example_playbook.yaml | 4 ++-- Section2/playbooks/variable_files.yaml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Section2/playbooks/install_Apache.yaml b/Section2/playbooks/install_Apache.yaml index e7f8599..2932ae6 100644 --- a/Section2/playbooks/install_Apache.yaml +++ b/Section2/playbooks/install_Apache.yaml @@ -1,10 +1,10 @@ --- - 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 diff --git a/Section2/playbooks/install_Apache_with_handlers.yaml b/Section2/playbooks/install_Apache_with_handlers.yaml index bae9e5b..f9c977b 100644 --- a/Section2/playbooks/install_Apache_with_handlers.yaml +++ b/Section2/playbooks/install_Apache_with_handlers.yaml @@ -1,7 +1,7 @@ --- - 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 diff --git a/Section2/playbooks/playbook_with_Jinja2.yaml b/Section2/playbooks/playbook_with_Jinja2.yaml index cc5ec3a..c26c509 100644 --- a/Section2/playbooks/playbook_with_Jinja2.yaml +++ b/Section2/playbooks/playbook_with_Jinja2.yaml @@ -1,14 +1,14 @@ --- - 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 diff --git a/Section2/playbooks/simple_example_playbook.yaml b/Section2/playbooks/simple_example_playbook.yaml index c4af863..6c04a1d 100644 --- a/Section2/playbooks/simple_example_playbook.yaml +++ b/Section2/playbooks/simple_example_playbook.yaml @@ -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 diff --git a/Section2/playbooks/variable_files.yaml b/Section2/playbooks/variable_files.yaml index 4dff49a..64c0c66 100644 --- a/Section2/playbooks/variable_files.yaml +++ b/Section2/playbooks/variable_files.yaml @@ -2,7 +2,7 @@ - name: Set up Apache hosts: webservers vars: - http_port: 80 + http_port: 80 - name: Set up Apache hosts: webservers -- GitLab