mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-06-07 16:09:53 +00:00
Delete roles
This commit is contained in:
parent
4601f095c8
commit
3526166c01
@ -25,35 +25,13 @@
|
||||
name: httpd
|
||||
state: started
|
||||
|
||||
#- name: Permissions apache2
|
||||
#file:
|
||||
#path: /etc/apache2
|
||||
#owner: www-data
|
||||
#group: www-data
|
||||
#recurse: yes
|
||||
#
|
||||
#- name: Permissions www
|
||||
#file:
|
||||
#path: /var/www
|
||||
#owner: www-data
|
||||
#group: www-data
|
||||
#recurse: yes
|
||||
#
|
||||
#- name: Start service httpd, if not started
|
||||
#service:
|
||||
#name: apache2
|
||||
#state: started
|
||||
#
|
||||
#- name: Enable service apache2, and not touch the state
|
||||
#service:
|
||||
#name: apache2
|
||||
#enabled: yes
|
||||
#
|
||||
#- name: Enable mod_rewrite
|
||||
#apache2_module:
|
||||
#name: rewrite
|
||||
#state: present
|
||||
#
|
||||
- name: Permissions httpd
|
||||
file:
|
||||
path: /var/www
|
||||
owner: apache
|
||||
group: apache
|
||||
recurse: yes
|
||||
|
||||
#- htpasswd:
|
||||
#path: /etc/apache2/.htpasswd
|
||||
#name: hifive
|
||||
@ -67,11 +45,3 @@
|
||||
#src: virtualhost.j2
|
||||
#dest: /etc/apache2/sites-available/{{ domain }}.conf
|
||||
#force: yes
|
||||
#
|
||||
#- name: a2ensite {{ domain }}
|
||||
#command: a2ensite {{ domain }}
|
||||
#
|
||||
#- name: Reload service apache2
|
||||
#service:
|
||||
#name: apache2
|
||||
#state: reloaded
|
||||
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
- hosts: hifive
|
||||
become: yes
|
||||
become_user: root
|
||||
tasks:
|
||||
- name: install php7
|
||||
apt:
|
||||
pkg:
|
||||
- php7.0
|
||||
- libapache2-mod-php7.0
|
||||
- php7.0-mysql
|
||||
- php7.0-curl
|
||||
- php7.0-json
|
||||
- php7.0-gd
|
||||
- php7.0-mcrypt
|
||||
- php7.0-msgpack
|
||||
- php7.0-memcached
|
||||
- php7.0-intl
|
||||
- php7.0-sqlite3
|
||||
- php7.0-gmp
|
||||
- php7.0-geoip
|
||||
- php7.0-mbstring
|
||||
- php7.0-xml
|
||||
- php7.0-zip
|
||||
state: present
|
30
ops/ansible/phpmyadmin.yml
Normal file
30
ops/ansible/phpmyadmin.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
- hosts: hifive
|
||||
become: yes
|
||||
become_user: root
|
||||
roles:
|
||||
- { role: common }
|
||||
|
||||
tasks:
|
||||
- name: Install amazon epel
|
||||
command: amazon-linux-extras install epel -y
|
||||
|
||||
- name: Install phpMyAdmin
|
||||
yum:
|
||||
name: phpmyadmin
|
||||
state: latest
|
||||
|
||||
- name: Create phpMyAdmin.conf
|
||||
template:
|
||||
src: phpMyAdmin.j2
|
||||
dest: /etc/httpd/conf.d/phpMyAdmin.conf
|
||||
force: yes
|
||||
|
||||
#- name: Create .htaccess
|
||||
#htpasswd:
|
||||
#path: /usr/share/phpMyAdmin/.htaccess
|
||||
#name: hifive
|
||||
#password: hifive
|
||||
#owner: root
|
||||
#group: www-data
|
||||
#mode: 0640
|
@ -1,38 +0,0 @@
|
||||
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).
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# defaults file for roles
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# handlers file for roles
|
@ -1,60 +0,0 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your 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
|
||||
|
||||
# Some suggested licenses:
|
||||
# - BSD (default)
|
||||
# - MIT
|
||||
# - GPLv2
|
||||
# - GPLv3
|
||||
# - Apache
|
||||
# - CC-BY
|
||||
license: license (GPLv2, CC-BY, etc)
|
||||
|
||||
min_ansible_version: 2.4
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
# Optionally specify the branch Galaxy will use when accessing the GitHub
|
||||
# repo for this role. During role install, if no tags are available,
|
||||
# Galaxy will use this branch. During import Galaxy will access files on
|
||||
# this branch. If Travis integration is configured, only notifications for this
|
||||
# branch will be accepted. Otherwise, in all cases, the repo's default branch
|
||||
# (usually master) will be used.
|
||||
#github_branch:
|
||||
|
||||
#
|
||||
# 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.
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# tasks file for roles
|
@ -1,2 +0,0 @@
|
||||
localhost
|
||||
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- roles
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# vars file for roles
|
79
ops/ansible/templates/phpMyAdmin.j2
Normal file
79
ops/ansible/templates/phpMyAdmin.j2
Normal file
@ -0,0 +1,79 @@
|
||||
# phpMyAdmin - Web based MySQL browser written in php
|
||||
#
|
||||
# Allows only localhost by default
|
||||
#
|
||||
# But allowing phpMyAdmin to anyone other than localhost should be considered
|
||||
# dangerous unless properly secured by SSL
|
||||
|
||||
Alias /phpMyAdmin /usr/share/phpMyAdmin
|
||||
Alias /phpmyadmin /usr/share/phpMyAdmin
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/>
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
<RequireAny>
|
||||
Require all granted
|
||||
Require ip 127.0.0.1
|
||||
Require ip ::1
|
||||
</RequireAny>
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from 90.105.114.249
|
||||
Allow from 127.0.0.1
|
||||
Allow from ::1
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/>
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
<RequireAny>
|
||||
Require all granted
|
||||
Require ip 127.0.0.1
|
||||
Require ip ::1
|
||||
</RequireAny>
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from 90.105.114.249
|
||||
Allow from 127.0.0.1
|
||||
Allow from ::1
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# These directories do not require access over HTTP - taken from the original
|
||||
# phpMyAdmin upstream tarball
|
||||
#
|
||||
<Directory /usr/share/phpMyAdmin/libraries/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/lib/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/frames/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
# This configuration prevents mod_security at phpMyAdmin directories from
|
||||
# filtering SQL etc. This may break your mod_security implementation.
|
||||
#
|
||||
#<IfModule mod_security.c>
|
||||
# <Directory /usr/share/phpMyAdmin/>
|
||||
# SecRuleInheritance Off
|
||||
# </Directory>
|
||||
#</IfModule>
|
Loading…
x
Reference in New Issue
Block a user