This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: development | |
tasks: | |
- name: Install apache2 package | |
apt: name=apache2 update_cache=yes state=latest | |
- name: Enable Mod Rewrite | |
apache2_module: name=rewrite state=present | |
- name: Restart Service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: webservers | |
tasks: | |
- name: Install MySQL | |
action: apt pkg={{ item }} state=latest | |
with_items: | |
- libmysqlclient-dev | |
- python-mysqldb | |
- mysql-server | |
- mysql-client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: webservers | |
vars: | |
- http_port: 8080 | |
- tomcat_version: 8.5.83 | |
tasks: | |
- name: JDK Installation | |
apt: | |
name: default-jdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: webservers | |
vars: | |
- appName: java-example.war | |
tasks: | |
- name: copy war | |
get_url: url=https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war dest=/opt/tomcat/webapps/{{ appName }} owner=tomcat group=tomcat mode=0744 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: webservers | |
tasks: | |
- name: Make sure that we can connect to the machine | |
ping: | |
- name: Stop Tomcat | |
shell: /opt/apache-tomcat-8.5.88/bin/shutdown.sh | |
- name: Remove Tomcat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: webservers | |
tasks: | |
- name: Run the equivalent of "apt-get update" as a separate step | |
apt: | |
update_cache: yes | |
- name: Install NodeJS package | |
apt: name={{ item }} state=latest | |
loop: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: webservers | |
tasks: | |
- name: Install Python package | |
apt: | |
pkg: | |
- python3 | |
- unzip | |
- python3-pip | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
distro: | |
image: alpine | |
container_name: Alpine_Distro | |
restart: always | |
entrypoint: tail -f /dev/null | |
database: | |
image: postgres:latest |