From 059a586c68df985251aed891f43641e7dfba03cb Mon Sep 17 00:00:00 2001 From: satya <38804803+satyamuralidhar@users.noreply.github.com> Date: Sun, 19 Jul 2020 11:14:15 +0530 Subject: [PATCH 1/2] Create lamp.yaml --- lamp-php/lamp.yaml | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 lamp-php/lamp.yaml diff --git a/lamp-php/lamp.yaml b/lamp-php/lamp.yaml new file mode 100644 index 000000000..11380ff9c --- /dev/null +++ b/lamp-php/lamp.yaml @@ -0,0 +1,74 @@ +--- +- hosts: all + become: yes + vars: + - packages: + - ubuntu-mate-core + - ubuntu-mate-desktop + - xrdp + + tasks: + - name: installing apache2 + apt: + name: apache2 + update_cache: yes + state: present + notify: + - restart apache + when: ansible_os_family == "Debian" + + - name: "installing depedencies" + apt: + + pkg: "{{ packages }}" + state: present + - name: download webpage + get_url: + url: https://raw.githubusercontent.com/asquarezone/AnsibleZone/master/ClassRoomExamples/July2018/basics/info.php + dest: /var/www/html/lamp.php + + + - name: install httpd + yum: + name: httpd + state: present + notify: + - restart httpd + when: ansible_os_family == "Redhat" + + - name: installing php + apt: + name: "{{ item }}" + state: present + with_items: + - php + - libapache2-mod-php + - php-mcrypt + - php-mysql + notify: + - restart apache + when: ansible_os_family == "Debian" + + - name: install php + yum: + name: "{{ item }}" + state: present + with_items: + - php + - php-mysql + notify: + - restart httpd + when: ansible_os_family == "Redhat" + + handlers: + - name: restart apache + service: + name: apache2 + state: restarted + when: ansible_os_family == "Debian" + + - name: restart httpd + service: + name: httpd + state: restarted + when: ansible_os_family == "Redhat" From 4595b5a8c757228261c5b4cd16d70f56a8fbbf54 Mon Sep 17 00:00:00 2001 From: satya <38804803+satyamuralidhar@users.noreply.github.com> Date: Sun, 19 Jul 2020 11:14:45 +0530 Subject: [PATCH 2/2] Create lamp.php --- lamp-php/lamp.php | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lamp-php/lamp.php diff --git a/lamp-php/lamp.php b/lamp-php/lamp.php new file mode 100644 index 000000000..cf6086080 --- /dev/null +++ b/lamp-php/lamp.php @@ -0,0 +1,3 @@ +