Commit 91d7b850 authored by Ing. Matej Madeja's avatar Ing. Matej Madeja
Browse files

full version for ubuntu

parent 49eeadee
---
- name: "Administrative group install"
hosts:
- linuxes
vars:
- bgUrl: https://edmontongazette.com/wp-content/uploads/2018/07/Women-CEO.jpg
roles:
- common
- office
---
- name: "Development group install"
hosts:
- linuxes
vars:
- bgUrl: https://cdn.wallpapersafari.com/55/73/ghY4rc.jpg
roles:
- common
- dev
ansible_host: 127.0.0.1
ansible_user: vagrant
ansible_become_pass: "{{ mojeheslo }}"
\ No newline at end of file
ansible_host: 127.0.0.1
ansible_become_pass: '{{ sudo_password }}'
\ No newline at end of file
ansible_port: 10022
\ No newline at end of file
ansible_port: 10022
ansible_port: 11022
\ No newline at end of file
ansible_port: 11022
---
- name: "Install LAMP stack"
hosts:
- linuxes
roles:
- lamp
---
- name: "Management group install"
hosts:
- linuxes
vars:
- bgUrl: https://www.reactive-executive.com/wp-content/uploads/2017/12/Change-Management.jpg
- import_playbook: development.yml
- import_playbook: adminitrative.yml
$ANSIBLE_VAULT;1.1;AES256
37643964383733333263653862363135636465336563663666356630373232643232343531313135
3062653364323632386138393436656432363761313931620a393366313339616332373935313239
63333265383938323661323833353265656637653665613864643832353736323132336236396230
6163336163393737620a313335326465626638313630613639396238333633316530613466393661
32396434303066386639343065303338376632643232653663666464643638663962
34376533336163653161363066396661663662623664623836646564616662336530653563666339
6537616434363161306132666535626464343431326533360a376130633166323137623265666234
33363431323936373032393266373037373834386464356265656332336238333030663937376231
3335646631313065330a643862363533383738663464623265663431353631666665623362626537
35653038353634366139373539386232623033616538343130653065663433643065
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
---
# defaults file for dev
\ No newline at end of file
---
# handlers file for dev
\ No newline at end of file
galaxy_info:
author: your name
description: your role description
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.9
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
\ No newline at end of file
---
# tasks file for dev
- name: Install pidgin and office
apt:
pkg:
- docker-compose
- git
- docker-engine
---
- hosts: localhost
remote_user: root
roles:
- dev
\ No newline at end of file
---
# vars file for dev
\ No newline at end of file
<h1>This is my default index html file</h1>
\ No newline at end of file
......@@ -6,6 +6,7 @@
apt:
pkg:
- software-properties-common
update_cache: yes
- name: "Add ppa:ondrej/php repo"
become: yes
......@@ -20,4 +21,43 @@
- php7.3
- php7.3-mysql
- mariadb-server
- mariadb-client
\ No newline at end of file
- mariadb-client
update_cache: yes
# - name: "Deploy index.html"
# become: yes
# copy:
# src: "index.html"
# dest: /var/www/html/index.html
# tags:
# - files
# - name: "Deploy index.html from template"
# become: yes
# template:
# src: "index.html.j2"
# dest: /var/www/html/index.html
# tags:
# - files
- name: "Remove index.html"
become: yes
file:
path: /var/www/html/index.html
state: absent
tags:
- files
- name: "Deploy index.php"
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