Commit 18b57268 authored by Ing. Matej Madeja's avatar Ing. Matej Madeja
Browse files

continuous commit

parent 91d7b850
- name: "Install prerequisities for debian"
apt:
pkg:
- lsb-release
- apt-transport-https
- ca-certificates
- name: "Add repo"
get_url:
url: https://packages.sury.org/php/apt.gpg
dest: /etc/apt/trusted.gpg.d/php.gpg
- name: "Add to source list"
shell: "echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php7.3.list"
- name: "Add ppa:ondrej/php repo"
become: yes
apt_repository:
repo: "ppa:ondrej/php"
\ No newline at end of file
--- ---
# tasks file for lamp # tasks file for lamp
- block:
- name: "Make sure that software-properties-common is installed"
apt:
pkg:
- software-properties-common
update_cache: yes
- name: "Make sure that software-properties-common is installed" - debug:
become: yes var: ansible_os_family
apt: tags: debug
pkg:
- software-properties-common
update_cache: yes
- name: "Add ppa:ondrej/php repo" - debug:
become: yes var: ansible_distribution
apt_repository: tags: debug
repo: "ppa:ondrej/php"
- name: "Install packages" - include: Ubuntu.yml
become: yes when: ansible_distribution == 'Ubuntu'
apt:
pkg: - include: Debian.yml
- apache2 when: ansible_distribution == 'Debian'
- php7.3
- php7.3-mysql - name: "Install packages"
- mariadb-server apt:
- mariadb-client pkg:
update_cache: yes - apache2
- php7.3
# - name: "Deploy index.html" - php7.3-mysql
# become: yes - mariadb-server
# copy: - mariadb-client
# src: "index.html" update_cache: yes
# dest: /var/www/html/index.html
# tags: # - name: "Deploy index.html"
# - files # become: yes
# copy:
# - name: "Deploy index.html from template" # src: "index.html"
# become: yes # dest: /var/www/html/index.html
# template: # tags:
# src: "index.html.j2" # - files
# dest: /var/www/html/index.html
# tags: # - name: "Deploy index.html from template"
# - files # become: yes
# template:
- name: "Remove index.html" # src: "index.html.j2"
become: yes # dest: /var/www/html/index.html
file: # tags:
path: /var/www/html/index.html # - files
state: absent
tags: - name: "Remove index.html"
- files file:
path: /var/www/html/index.html
state: absent
tags:
- files
- name: "Deploy index.php"
copy:
src: "index.php"
dest: /var/www/html/index.php
tags:
- files
- name: "Deploy index.php" - debug:
var: role_path
tags:
- files
become: yes become: yes
copy:
src: "index.php"
dest: /var/www/html/index.php
tags:
- files
- debug:
var: role_path
tags:
- files
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment