pax_global_header 0000666 0000000 0000000 00000000064 14574576707 0014540 g ustar 00root root 0000000 0000000 52 comment=1e2ec6a33280628d5fd080ea8f3fd0f9ec39d0e6
ansible-paquerette-master/ 0000775 0000000 0000000 00000000000 14574576707 0016167 5 ustar 00root root 0000000 0000000 ansible-paquerette-master/.gitignore 0000664 0000000 0000000 00000000231 14574576707 0020153 0 ustar 00root root 0000000 0000000 play.book.yml
hosts
__pycache__/*
host_vars/*
group_vars/*
releases/*
contract/*
paquerette_utils.conf.yml
hz_token
public/
online/
# IDE
.idea
.vscode
ansible-paquerette-master/.gitmodules 0000664 0000000 0000000 00000000001 14574576707 0020333 0 ustar 00root root 0000000 0000000
ansible-paquerette-master/LICENCE.txt 0000664 0000000 0000000 00000104451 14574576707 0017777 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
ansible-roles-paquerette
Copyright (C) 2020 Jérôme Marchini
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
ansible-roles-paquerette Copyright (C) 2020 Jérôme Marchini
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
ansible-paquerette-master/README.md 0000664 0000000 0000000 00000015070 14574576707 0017451 0 ustar 00root root 0000000 0000000 # ansible-roles-paquerette
*Proposition of **minimal** ansible roles, to host and maintain services on premise or in the cloud.*
Supported systems : **Ubuntu 20.04+ LTS**
partially : **debian 10+**
Principles :
- "less is more" and "simpler is better"
- usage of Ansible for all good reasons
- minimisation of shell usage
- 1 configuration file per host with his complete definition and the list of instances
- 1 utility to manage inventory : inventory.py
- 1 utility to apply changes on servers : play.py
- possibility to recover backup on a separate dedicated machine, the master backup server
Technical choices:
- 2 physical partitions based configuration, 1 system, 1 programs and data, mounted on **/mnt/vdb** by default
- monitoring : **monit**
- backup : **backupninja**, external backup in "master/slave" mode: an external server is connecting to the host to recover backups
- mail, alters : **postfix as SMTP relay**, possibility of bcc
- **all** services are provided using HTTPS with **letsencrypt** certificates
## 0 - Prerequisites
- an ubuntu machine with public IP. (**the server**)
- a machine with ansible to manage the servers. (**the controller**) (It is also possible to use ansible locally on the server)
- on the server : optionally, recommended, a distinct partition for data and programs, mounted on /mnt/vdb by default. If absent, set **data_partition** to *no* or *False* in the host_vars
- on the server : **an administrative account** which can sudo commands as root without providing password
- on the server: an ssh key for the master backup server (can be the same as the administrative account, but not recommended)
- **a mail box** available via SMTP for alerts.
All relevant variables are in the group_vars base_server file, in PREREQUISITES sections
## 1 - The inventory
Here is the definition of the list of servers, for each server the composition of the platform and the list of instances and all role variables.
in groups_vars :
***In bold**, groups to be defined specifically, as your needs.*
- secret : common secret variables (partner keys, smtp password...)
- - base_server : all common non secret variables
- - - **test** : all specifics variables for testings hosts
- - - **prod** : all specifics variables for production hosts
etc...
cf: [./doc/hosts.prod](./doc/hosts.prod)
## 2 - The server
Here is the definition of the base of the server, it implements :
- the base file and directory organization
- the server localization
- the backup strategy
- the monitoring strategy
cf: [./doc/host_template.yml](./doc/host_template.yml)
**rôle : [base_server](./roles/base_server/README.md)**
## 3 - The platform
Here is the definition of the components used to run the instances, it implements :
- web server (nginx, apache,...)
- database server (mariadb, postgres, mongodb...)
- languages (php, python, nodejs...)
- associated monitoring
**role : [base_platform](./roles/base_platform/README.md)**
## 4 - Instance deployment, upgrade, removal, maintenance, restoration, etc...
Here is the implemented methods for the full live of an instance :
for the deployment (install / reinstall command):
- download of the application
- database and dependencies management (letsencrypt certificate...)
- base configuration of the application
- backup and monitoring
- service start
for the upgrade (upgrade command):
- download of the new version
- service stop
- complete cold backup
- less or more automatic upgrading of the application
- service start
for the removal (uninstall command):
- stop backup and monitoring
- service stop
- program removal and database drop
- removal of associated tasks (logrotate...)
- revocation and deletion of the letsencrypt certificate
for the restoration (restore command):
- recovering of database and application files from archive, and restoration, except external data as users files for Nextcloud
**roles : \_instance**
## 5 - Reusable elements
Roles are using factorized parts and reusable (database creation, certificates etc...)
**roles : \_app\_\**
## 6 - Instance management
The inventory is managed with the utility program **inventory.py**
The application of the changes is done with the utility program **play.py** which generates the playbook and runs ansible.
for example :
./inventory.py --new-instance
./play.py myhost myinstance install
./play.py -e 'domain_name=www.peace.org' -r myhost letsencrypt_nightly_new
**utility programs : inventory.py, play.py**
## 7 - Utility roles
Getting letsencrypt certificates during the nightly shutdown: **letsencrypt_nightly_new** :
./play.py -e 'domain_name=www.peace.org' -r myhost letsencrypt_nightly_new
## 8 - Special cases
Some roles are specifics, as the Collabora instance management :
**roles :**
- **collabora\_online\_instance**
- **mumble_server**
- **wekan_instance_snap** (no longer maintained)
- **turn\_server**
- **_master_backup_server**
## Some vars
- **clear_app_user_password** : The clear password to get chrooted sftp environment to access the web_app
- **app_user_password** : The user password of the web app in what format ?
## Documentation :
cf: [The documentation of your dreams](./doc/README.md "And all your dreams come true !")
## Notes :
STABLES ROLES
- base server (_python3)
- base platform (apache, nginx, mysql/mariadb, mongodb, nodejs, postgres, php7_fpm )
- _app_log_inventory, _app_backup, _app_restore_instance, _app_logrotate, _app_monit, _create_database, _letsencrypt_certificate
- backup in master/slave mode
- nextcloud_instance (nginx, apache)
- collabora online_instance (official partner) (nginx, apache)
- dolibarr_instance (apache only) (no longer maintained)
- rocketchat_instance (no longer maintained) : unfortunately, it's now impossible to install several instances on the same host
- _web_app (chrooted sftp only user, git, static, php, python) (empty, wordpress, grav, pelican, yeswiki, adminer etc...) (apache only)
- derived from _web_app : wordpress_instance, yeswiki_instance, adminer_instance
- mattermost_instance
NEW ROLES OR IN PROGRESS (may be subject to important refactoring):
- tryton_instance
- framadate_instance (install only)
- grav_instance, pelican_instance,
- wekan snap (missing uninstall)(no longer maintained)
- turn_server
- mumble_server (install only beta)
OTHERS :
- status.py : utility providing a rapid check of the production
TODO :
- database files in system partition : move /var/lib/ postgres.... in /mnt/vdb/ ... in study
- failtoban for services (or not)
to redesign :
- wekan snap in backup role
[paquerette.eu](http://paquerette.eu "L'informatique responsable est l'affaire de tous !")
ansible-paquerette-master/README_fr.md 0000664 0000000 0000000 00000017566 14574576707 0020154 0 ustar 00root root 0000000 0000000 # ansible-roles-paquerette
*Proposition de rôles ansible **minimaux**, pour mettre en oeuvre et maintenir des applications sur des machines auto hébergées ou dans le cloud.*
Systèmes supportés : **Ubuntu 16.04 LTS**, **Ubuntu 18.04 LTS**
partiellement : **debian 9**
Principes :
- "less is more" et "simpler is better"
- utilisation d'ansible pour toutes les bonnes raisons
- minimisation de l'usage du shell
- 1 fichier de configuration par hôte avec sa définition et la liste des instances hébergées
- 1 utilitaire pour gérer l'inventaire des serveurs et des applications : inventory.py
- 1 utilitaire pour appliquer les changements sur les serveurs et les applications : play.py
- possibilité de récupérer les sauvegardes sur une machine dédiée (master backup server)
Choix techniques:
- configuration basée sur deux partitions, 1 système, 1 pour les données et les programmes montée sur **/mnt/vdb** par défaut
- monitoring : **monit**
- backup : **backupninja**, backup externe en mode "master/slave" : un serveur externe se connecte sur la machine pour récupérer les archives mises à sa disposition
- mail, remontée de messages : **postfix configuré en relais SMTP**, possibilité de copie cachée systématique permettant l'envoi de sms par exemple, non détaillé ici
- **tous** les services web sont fournis en HTTPS et utilisent des certificats **letsencrypt**
## 0 - Prérequis
- une machine ubuntu avec une adresse ip publique. (**le serveur**)
- une machine avec ansible à partir de laquelle effectuer le déploiement. (**le contrôleur**) (il est aussi possible d'utiliser ansible localement sur le server)
- sur le serveur : en option, mais recommandé une partition de donnée sur la machine montée sur /mnt/vdb par défaut. Si absente, positionner dans les host_vars **data_partition** à *no* ou *False*
- sur le serveur : **un compte d'administration** permettant l'execution de commande via sudo et sans renseigner de mot de passe, avec sa clé ssh
- sur le serveur : une clé ssh permettant la connexion du compte récupérant les sauvegardes (peut être la même que le compte d'administration, mais non recommandable)
- **une boîte mail** accessible via SMTP pour relayer par défaut l'ensemble des messages.
L'ensemble des variables associées sont dans le fichier base_server, dans les sections PREREQUISITES
## 1 - L'inventaire
C'est la partie qui définit la liste des machines pilotées, la composition de la plateforme de support applicative pour chaque serveur et la liste des instances applicatives et toutes les variables utiles aux rôles.
fichiers dans group_vars
***En gras**, les groupes à définir localement, selon les besoins.*
- secret : les variables communes qui doivent rester secrètes (mot de passe etc...)
- - base_server : toutes les variables communes non secrètes
- - - **test** : toutes les variables propres aux machines de test
- - - **prod** : toutes les variables propres aux machines de production
etc...
cf: [./doc/hosts.prod](./doc/hosts.prod)
## 2 - Le serveur
C'est la partie qui définit les bases du serveur, elle est la couche basse. Elle met en oeuvre :
- l'organisation des répertoires et fichiers
- la localisation du serveur
- la stratégie de sauvegarde
- la stratégie de monitoring
cf: [./doc/host_template.yml](./doc/host_template.yml)
**rôle : [base_server](./roles/base_server/README.md)**
## 3 - La plateforme de support applicative
C'est la partie qui définit l'ensemble des services ou composants nécessaire au fonctionnement d'une instance applicative. Elle met en oeuvre :
- les serveurs web (nginx, apache,...)
- les serveurs de base de données (mariadb, postgres, mongodb...)
- les languages (php, python, nodejs...)
- le monitoring associé à ces composants
**role : [base_platform](./roles/base_platform/README.md)**
## 4 - Le déploiement de l'instance applicative, la mise à jour, la désinstallation complète, la restauration etc...
C'est la partie qui définit la méthode de déploiement et de mise à jour d'une instance applicative. Elle met en oeuvre,
pour le déploiement (commande install / reinstall):
- le téléchargement d'une application
- la création des bases de données et dépendances (certificat letsencrypt...)
- la configuration de base de l'application
- la mise en place des sauvegardes et du monitoring
- le démarrage du service
pour la mise à jour (commande upgrade):
- le téléchargement de la nouvelle version
- l'arrêt du service
- la sauvegarde complète de la version courante à froid
- la mise à jour du logiciel et de la base de données + ou - automatisée selon l'application
- le redémarrage du service
pour la suppression complète (commande uninstall):
- l'arrêt du monitoring
- l'arrêt du service
- la suppression de l'application et de la base de données
- la suppression des tâches de sauvegarde et associées (logrotate...)
- la révocation et la suppression du certificat letsencrypt
pour la restauration (commande restore):
- récupération de la base de données et des fichiers applicatifs, en dehors des données externes telles que les fichier utilisateurs de Nextcloud
**rôles : \_instance**
## 5 - Éléments réutilisables
Les rôles utilisent des parties factorisées dans des rôles réutilisables (création de base de données, de certificats etc...)
**rôles : \_app\_\**
## 6 - Gestion des instances
La gestion de l'inventaire des instances se fait avec le programme **inventory.py**
L'application des modifications de l'inventaire se fait avec le programme **play.py** qui génère le playbook et le lance avec ansible
par exemple :
./inventory.py --new-instance
./play.py myhost myinstance install
./play.py -e 'domain_name=www.peace.org' -r myhost letsencrypt_nightly_new
**utilitaires : inventory.py, play.py**
## 7 - Rôles utilitaires
Obtention de certificats letsencrypt pendant la coupure nocturne : **letsencrypt_nightly_new** :
./play.py -e 'domain_name=www.peace.org' -r myhost letsencrypt_nightly_new
## 8 - Cas particuliers
Ce sont des rôles qui permettent de déployer des applications telles Collabora d'une façon spécifique.
**rôles :**
- **collabora\_online\_instance**
- **mumble_server**
- **wekan_instance_snap** (plus maintenu)
- **turn\_server**
- **_master_backup_server**
## Documentation :
cf: [The documentation of your dreams](./doc/README.md "And all your dreams come true !")
## Notes :
ROLES STABLES
- base server (_python3)
- base platform (apache, nginx, mysql/mariadb, mongodb, nodejs, postgres, php7_fpm )
- _app_log_inventory, _app_backup, _app_restore_instance, _app_logrotate, _app_monit, _create_database, _letsencrypt_certificate
- backup en mode master/slave
- nextcloud_instance (nginx, apache)
- collabora online_instance (partenaire officiel) (nginx, apache)
- dolibarr_instance (apache uniquement) (plus maintenu)
- rocketchat_instance (plus maintenu) : il est devenu impossible d'installer plusieurs instances sur une même machine, rocket.chat n'est pas prévu pour ça
- _web_app (chrooted sftp only user, git, static, php, python) (empty, wordpress, grav, pelican, yeswiki, adminer etc...) (apache uniquement)
- dérivés de _web_app : wordpress_instance, yeswiki_instance, adminer_instance
- mattermost_instance
ROLES NOUVEAUX OU EN DÉVELOPPEMENT (qui peuvent subir un refactoring important):
- tryton_instance
- framadate_instance (installation uniquement)
- grav_instance, pelican_instance,
- wekan snap (manque uninstall) (plus maintenu)
- turn_server
- mumble_server (installation uniquement béta)
AUTRES
- status.py : utilitaire permettant de faire un check rapide de la production, en cours de développement
TODO :
- bases de données dans la partition système : déplacer le /var/lib/ postgres.... dans /mnt/vdb/ à l'étude
- failtoban pour les services (ou pas)
à revoir :
- wekan snap dans le rôle de backup
[paquerette.eu](http://paquerette.eu "L'informatique responsable est l'affaire de tous !")
ansible-paquerette-master/book_all_servers.yml 0000664 0000000 0000000 00000000363 14574576707 0022247 0 ustar 00root root 0000000 0000000 ---
- hosts: secured
roles:
- base_secure_ssh
become: yes
- hosts: application_servers
roles:
- base_server
- base_platform
become: yes
- hosts: docker
roles:
- docker_server
become: yes
ansible-paquerette-master/doc/ 0000775 0000000 0000000 00000000000 14574576707 0016734 5 ustar 00root root 0000000 0000000 ansible-paquerette-master/doc/README.md 0000664 0000000 0000000 00000002150 14574576707 0020211 0 ustar 00root root 0000000 0000000 Documentation :
For simple things see [Cookbook.md](./cookbook.md "The wonderful cookbook")
For advanced stuff see [Avanced stuffs.md](./advanced stuffs.md "The amazing solutions to your amazing problems")
Better than all, try it following [quickstart.md](./quickstart.md "The quickstart guide that will change your live") using [hosts.first](./hosts.first), [myfirsthost.yml](./myfirsthost.yml)
Base configuration file for inventory.py and play.py utilities is here : [paquerette_utils.conf.yml](./paquerette_utils.conf.yml "The best configuration file you ever read") and should be copied when easily filled with your host list into the install directory
Host configuration file is here : [host_template.yml](./host_template.yml "The template of the century")
Base server configuration file : [base_server_template.yml]() to be copied in group_vars/base_server/baser_serve.yml
Sample for production server inventory is here : [hosts.prod](./hosts.prod "The ultimate revelation")
If you want to user ansible paquerette roles in your own project follows [how to setup your own project](./project_installation/readme.md) ansible-paquerette-master/doc/advanced stuffs.md 0000664 0000000 0000000 00000012676 14574576707 0022332 0 ustar 00root root 0000000 0000000 ## Advanced stuffs and things you will have to do soon or late... or never
### Advanced running facilities
#### scheduling playbook
using **at** command
at command must be installed on controller :
sudo apt install at
# ensure at is running
sudo atd
use the --at-time option (see at manual for syntax)
./play.py myhost myinstance mycommand **-a 05:00**
the script logs in the file : myhost_myinstance_mycommand.log
#### making scripts 'walking' on instances
using **--script-command**
It is possible to prepare a script to apply changes on a set of instance :
./play.py -s mycommand
prints on stdout a list of ./play calls that you can filter :
./play.py -s upgrade | grep myhost
or decorate...
./play.py -s 'maintenance -a 05:00' | grep nextcloud_instance > myscript.sh
... you can adapt the default template **script_default_template** in the configuration file to your needs.
#### using local releases to avoid download problems
It is possible to deploy releases from controller machine instead of trying to download them from external repository.
To do that, just store the archive in **releases/{{ role_name }}/default** to deploy it.
eg :
ls ./releases/wordpress_instance/
lrwxrwxrwx 1 jerome jerome 13 juin 19 10:59 default -> latest.tar.gz
-rw-rw-r-- 1 jerome jerome 11200591 juin 18 19:52 latest.tar.gz
- local_release : **releases/{{ role_name }}/default** (app_src must be set, set to "None" or "Local" for local only applications)
### Backup, restoration, recovery
[README.md](../roles/_app_restore_instance/README.md)
*NB* : **Nextcloud, and other applications are using and external data directory**, the backup and restoration of **user files are not covered by standard backup**. the reason is the volume is too big for that. If the files are critical, then find another solution more adapted for that like rclone based solution.
#### setup a remote backup server
using **_master_backup_server** role
It is nice to have an independent server with backups of your instances, strongly recommended for production environment
The master backup server uses ssh to connect to the production host with a key by default in ".ssh/backup_master", see *(
**master_backup_key_path** and master_backup_key_file )*
setup the host_var **backup_slaves** : backup_slaves: ["myhost1", "myhost2",] etc
./play.py -ry mymasterbackuphost base_server
./play.py -ry mymasterbackuphost _master_backup_server
You may also remove a previously backup salved by updating the **remove_slaves** variable : remove_slaves: ["nohost1","nohost2"]
#### find all archives containing an instance and all "version backup" slots
using **_app_restore_instance** role or **restore command** and **restore_action=list**
"version backup" are made first when the upgrade command is called on an instance
find an archive containing the instance on the host :
./play.py myhost myinstance restore -e 'restore_action=list'
find an archive containing the instance on the backup master host :
./play.py -ry masterbackuphost _app_restore_instance -e 'restore_action=list app_host=myhost app_instance_id=myinstance'
#### after a crash
using **restore_action=restore**
to restore an instance, ensure it is deployed (empty):
./play.py myhost myinstance install
then use the restore action using archive previously found as myarchive.tar.gz as explained above:
-case 1: from the same host
./play.py myhost myinstance restore -e 'restore_action=restore restore_source=myarchive.tar.gz'
-case 2 : from the controller :first copy the recovered archive to the host and restore it locally
./scp my_archive.tar.gz ubuntu@myhost:/tmp/my_archive.tar.gz
./play.py myhost myinstance restore -e 'restore_action=restore restore_source=/tmp/myarchive.tar.gz from_full_archive=no'
*NB* : if _app_restore_instance role is not integrated in the "instance role" extra vars must be provided by hand
#### installing an instance cloning another instance
using **from_instance_id**
It can be very useful to migrate files and database from an instance to another one. It is possible to clone an instance like this :
./play.py myhost myinstance_new install
./play.py myhost myinstance_new restore -e 'restore_action=restore restore_source=myarchive.tar.gz from_instance_id=myinstance"
*NB* : remember that **external data directory is not covered by standard backup**, migrating data must be done by hand
#### recover file and database of an instance
using **restore_action=recover**
first find the archive as explained above, then
./play.py myhost myinstance restore -e 'restore_action=recover restore_source=myarchive.tar.gz'
or
./play.py -ry masterbackuphost _app_restore_instance -e 'restore_action=recover restore_source=myarchive.tar.gz app_instance_id=myinstance'
#### restoring after problematic upgrade
using **from_version_backup=yes**
/play.py -y my_host myinstance restore -e 'restore_action=restore restore_source=/mnt/vdb/backups/version/myinstance/oldversion from_version_backup=yes'
### writing new roles
The best way to write new roles to provide new applications with less effort is to rely on reusable roles.
If the application is standard, use the [_web_app](../roles/_web_app/README.md) role and complete it as you need.
See [wordpress instance vars](../roles/wordpress_instance/vars/main.yml) as example of reusing _web_app without any code.
### customizing inventory tools
coming soon...
### upgrade system host
coming soon... ansible-paquerette-master/doc/base_server_template.yml 0000664 0000000 0000000 00000014105 14574576707 0023653 0 ustar 00root root 0000000 0000000 ---
#############################################
# GLOBAL CONFIGURATION
#############################################
#############################################
# BASE PACKAGES
#############################################
# debian, ubuntu 16 +
base_packages_list: [
"anacron",
# needed for ansible apt
"aptitude",
"apt-transport-https",
# backup solution
"backupninja",
"curl",
# needed for timezone
"dbus",
"ed",
"git",
"htop",
"iftop",
"iotop",
# needed for smtp ssl
"libsasl2-modules",
"monit",
"nano",
"nfs-common",
"postfix",
"tree",
"python3-pip",
"python3-apt",
"rsync",
"ufw",
"unzip",
"vim",
"zip",
]
debian_backports_uri: "http://http.debian.net/debian"
debian_backports_components: "{{ansible_distribution_release}}-backports main contrib non-free"
#############################################
# SCHEDULING BACKUP AND LETSENCRYPT RENEW
#############################################
# 03:05 backup_monit_stop
# 03:06 backup_web_stop
# 03:07 new_cert_standalone
# 03:07 backup_base_service_conf_time
# 03:08 backup_app_service_conf_time
# 03:10 renew_cert_standalone
# 03:20 backup_web_start
# 03:21 backup_monit_start_hour
# 03:30 backup_day_conf_time
# 03:30 backup_month_conf_time
# 04:00 master_backup_time
# 06:00 monit_start_anyway_hour (every 10 minutes until 03:00)
#############################################
# FILE SYSTEM
#############################################
# allow to use different partition form /
data_partition: yes
base_prod_path: "/mnt/vdb"
base_prod_ansible_log: "{{ base_prod_path }}/ansible_log"
base_prod_options: "{{ base_prod_path }}/opt"
base_prod_log: "{{ base_prod_path }}/log"
base_root_opt: "{{ base_prod_path }}/opt-root"
base_chroot_jail: "{{ base_prod_path }}/jail"
# retention for files, all files older than retention in days will be deleted (weekly)
tmp_file_retention: "7"
log_file_retention: "60"
#############################################
# USER CHROOT AND SFTP ONLY
#############################################
sftp_users_chroot: "sftp_users_chroot"
#############################################
# SMTP POSTMASTER
#############################################
# START PREREQUISITES
# smtp_shortfrom: "postmaster"
# smtp_domain: "mydomain.org"
# smtp_host: "my.smtphost.org"
smtp_port: "587"
smtp_user: "{{ smtp_shortfrom }}@{{ smtp_domain }}"
# smtp_password: "verysecret"
base_postmaster: "{{ smtp_shortfrom }}@{{ smtp_domain }}"
# END PREREQUISITES
# override to "" to send also mails in copy to {{ mail_in_copy }} (monit and postfix)
comment_for_copy_mail: "#"
mail_in_copy: "NOMAIL"
alert_group: "PROD"
#############################################
# BACKUP
#############################################
# backup scripts are here
backup_item_dir: "/etc/backup.d"
# backup destinations
# base destination
backup_base_dir: "{{ base_prod_path }}/backups"
# production daily backup
backup_prod_dir: "{{ backup_base_dir }}/prod"
# used for upgrades of instances
backup_version_dir: "{{ backup_base_dir }}/version"
# for opt components
backup_opt_dir: "{{ backup_prod_dir }}/opt"
backup_root_opt_dir: "{{ backup_prod_dir }}/opt-root"
# stop and start web services for backup
backup_web_stop_hour: "3"
backup_web_stop_minute: "06"
backup_web_start_hour: "3"
backup_web_start_minute: "20"
# stop and start base services for backup
backup_base_service_conf_time: "03:07"
backup_app_service_conf_time: "03:08"
backup_day_conf_time: "03:30"
backup_month_conf_time: "{{ backup_day_conf_time }}"
### master - slave configuration ###
# user for master, and slave (same user)
backup_master_user: "backup_master_user"
backup_master_group: "{{ backup_master_user }}"
# keys for master (public + .pub)
# file location on master server and ansible automation server, behind $HOME
# START PREREQUISITES
master_backup_key_path: ".ssh/backup_master"
master_backup_key_file: "{{ master_backup_key_path }}/id_rsa"
# END PREREQUISITES
### master configuration ###
backup_master_slaves_location: "{{ backup_base_dir }}/slaves"
# list of hosts
backup_slaves: []
backup_master_hour: "4"
backup_master_minute: "00"
# random delay in seconds before making the copy to avoid bottleneck
backup_master_delay: "3600"
# slaves to be removed from the hosts to backup
remove_slaves: []
#############################################
# MONITORING
#############################################
backup_monit_stop_hour: "3"
backup_monit_stop_minute: "05"
backup_monit_start_hour: "3"
backup_monit_start_minute: "21"
monit_start_anyway_hour: "0,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23"
monit_start_anyway_minute: "*/10"
# in seconds
# 6 minutes
monit_cycle_duration: "300"
# 4 minutes
monit_start_delay: "240"
# system monitoring defaults
# when % raised then alert
monit_system_cpu_usage: 95
monit_system_memory_usage: 95
monit_system_swap_usage: 90
monit_system_root_partition_usage: 80
monit_system_data_partition_usage: 90
#############################################
# LETSENCRYPT
#############################################
new_cert_standalone_hour: "3"
new_cert_standalone_minute: "07"
renew_cert_standalone_hour: "3"
renew_cert_standalone_minute: "10"
renew_cert_copy_minute: "20"
renew_cert_days: "1,4"
letsencrypt_cert_root: "/etc/letsencrypt/live/"
certbot_revoke_command: "certbot revoke --delete-after-revoke --cert-path /etc/letsencrypt/live/{{ app_domain }}/fullchain.pem"
# todo: refactor
certbot_grant_command_apache2: 'certbot --agree-tos --authenticator standalone --installer apache -n -m {{ base_postmaster | mandatory }} -d {{ letsencrypt_domain | quote }} '
certbot_grant_command_nginx: "certbot certonly --agree-tos --webroot -n -m {{ base_postmaster }} --webroot-path=/var/www/html -d {{ letsencrypt_domain | quote }} "
# using that for the moment
certbot_grant_command_standalone: "certbot certonly --standalone --agree-tos -n -m {{ base_postmaster | mandatory }} -d {{ app_domain | quote }} "
#############################################
# WWW
#############################################
# www root directory and root directory for logs of reverse proxy
www_root: "{{ base_prod_path }}/www"
www_log: "{{ base_prod_log }}/{{ rev_proxy }}"
ansible-paquerette-master/doc/cookbook.md 0000664 0000000 0000000 00000010065 14574576707 0021066 0 ustar 00root root 0000000 0000000 Basic actions, for more advanced see ./advanced_stuffs.md
### Inventory
**List all inventory :**
./inventory.py
**List hosts :**
./inventory.py -L
**List instances of a host:**
./inventory.py -l myhost
or in interactive mode :
./inventory.py -l
**Filtrer to find something in inventory :**
./inventory.py -f mydomain.org
**Print information on an instance :**
./inventory.py -i myhost myinstance
or interactive :
./inventory.py -i
output example :
Definition of myinstance on myhost :
role: wordpress_instance
description: wordpress instance of mydomain.org
app_domain: myfomain.org
app_instance_id: wp_mydomain
database_password: dAH451a.?1qd*
app_user: mydomain_user
clear_app_user_password: d42?.8vyd9Rc4
app_user_password: $6$jDAdbjKOFVTgGhXP$R8zHbaYnqNNQ/TMOMfTOhBJ56S3g.DpO/yyhDufgQy5zZctdAqLBi5Rhk9kbnmgj4va2S9859EBf7BIoL7DU80
see also "preparing a message" for custom formatting
### Get a new letsencrypt certificate during the nightly shutdown
use **./play.py** to play the role **letsencrypt_nightly_new** on **myhost** with the "extravar" **mydomain.org**
./play.py -r myhost letsencrypt_nightly_new -e 'domain_name=mydomain.org'
### After that, install an instance on a host
**Note :** If the certificate is not present on the host, all services will be stopped (for 15 seconds) to get the certificate
First, use **./inventory.py** to add the instance in the inventory in interactive mode
./inventory.py -n
Answers the questions...
Then, install it on the server :
./play.py myhost myinstance install
if it fails some some reason (network...)
retry like this :
./play.py myhost myinstance reinstall
**install** command checks that the instance is **not present** on the host to avoid **replace an instance by another**.
**reinstall** command checks the instance is **present** on the host for the same reason
### After that, preparing a message for credentials or another stuff
./inventory.py -m
will print a message generated from **message_default_template** in configuration file with instance informations
### Upgrade an instance
First, use **./inventory.py** to change the version of the instance in the inventory in interactive mode
The upgrade process will create first a full backup of the instance in backup dir named "app_old_version"
**NOTE if the slot for app_old_version already exists, the backup is skipped. This is the condition for having a reliable backup procedure that can be ran again if something fails, until it succeeds.**
Then, upgrade it on the server :
./play.py myhost myinstance upgrade
### Remove an instance
First uninstall it on the server :
./play.py -e 'app_instance_to_uninstall=myinstance' myhost myinstance uninstall
"app_instance_to_uninstall=myinstance user_to_remove=myuser" is just a double check, to be sure you really want to uninstall it.
**Note** :
* If The instance is removed from the inventory before applying on the server, you must recovery the instance informations from the backup of the host_vars file
* **Backups are not destroyed when an instance is removed.**
* User is not removed unless the extra var **user_to_remove** is set with the correct user name. (many instances may be installed for the same user)
Then, remove it on inventory :
./inventory.py -r myhost myinstance
### Touch an instance, change informations in inventory and apply changes
./inventory.py -t myhost myinstance
You will be prompted for changes. If any changes can be applied on the server, run ./play.py host instance reinstall
If the domain name is changed, then finally run the role cleanup_old_domain_name to remove old certificates and monitoring this way:
./play.py -r myhost _cleanup_old_domain_name -e 'app_domain=myolddomain'
### Touching playbook before running it (maybe useful in some cases, keeping control on playbook)
Answers **NO** to **"run playbook (y/N) ?"** when using ./play.py. The playbook file **play.book.yml** is generated, you can touch it and then simply launch it with ansible :
ansible-playbook play.book.yml
ansible-paquerette-master/doc/host_template.yml 0000664 0000000 0000000 00000003345 14574576707 0022334 0 ustar 00root root 0000000 0000000 paquerette_name: "something nice to you"
# appears in selection lists in utilities inventory.py and play.py
description: "description of the host"
# BASE SERVER VARIABLES
#######################
# REMOTE BACKUP SERVER
# if this host is used as remote backup master server for other hosts (see advanced stuff)
# default is []
# backup_slaves: ["host1", "host2", ...]
# DATA PARTITION
# if set to "yes", then monitoring is enabled on the partition
# set to "no" if there is only one physical partition
# default is yes
# data_partition: no
# ALERTS
# set to comment_for_copy_mail to "" to uncomment copy mail in alert settings,
# default is "#"
# comment_for_copy_mail: "#"
# used when comment_for_copy_mail is ""
# mail_in_copy: "incopy@mymailbox.org"
# used in the subject of monit alerts
# default is "PROD"
# alert_group: "PROD"
# BACKUP
# it is strongly recommended to set up a master backup server and provide a ssh key in the default location
# default path to the public key added needed by the remote server to connect by ssh
# master_backup_key_path: ".ssh/backup_master"
## PLATFORM VARIABLES
#####################
# apache2 is available for everything :
# rev_proxy: "apache2"
# you can choose nginx instead, but the support is partial, need help for that
# rev_proxy: "nginx"
# mariadb_mysql_server: yes
# choose one between "mariadb" and "mysql", default is "mariadb"
# mariadb_mysql: "mariadb"
# mysql_root_password: "somethinghardtoguess"
# postgres_server: yes
# mongodb_server: yes
# mongodb_admin_user: "admin_mongo"
# mongodb_admin_password: "somethingsecret"
# php_server: yes
# php_version: '7.2'
# nodejs: yes
## INSTANCES VARIABLES
######################
# use "inventory.py -n" to add instances to the host
app_instances: []
ansible-paquerette-master/doc/hosts.first 0000664 0000000 0000000 00000000314 14574576707 0021143 0 ustar 00root root 0000000 0000000 ### hosts
myfirsthost ansible_host= ansible_user=ubuntu ansible_ssh_private_key_file=~/.ssh/paquerette/id_rsa
### groups
[test]
myfirsthost
### group hierarchy
[base_server:children]
test
ansible-paquerette-master/doc/hosts.prod 0000664 0000000 0000000 00000000707 14574576707 0020766 0 ustar 00root root 0000000 0000000
### hosts
prodhost1 hostvar=...
prodhost2 hostvar=...
prodhost3 hostvar=...
testhost1 hostvar=...
### groups
[secured]
prodhost1
prodhost2
prodhost3
[application_servers]
prodhost1
prodhost3
[large_hosts]
prodhost3
[test]
testhost1
[prod]
prodhost1
prodhost2
### group hierarchy
[base_server:children]
prod
test
[secret:children]
base_server
[all:vars]
#
# default for new machines
#
ansible_user=....
ansible_ssh_private_key_file=..........
ansible-paquerette-master/doc/myfirsthost.yml 0000664 0000000 0000000 00000001371 14574576707 0022054 0 ustar 00root root 0000000 0000000 ---
paquerette_name: "my first paquerette server"
description: "an amazing quickstart server"
data_partition: no
smtp_shortfrom: "PRERIQUISITE : SMTP USER NAME"
smtp_domain: "PRERIQUISITE : SMTP DOMAIN NAME"
smtp_host: "PRERIQUISITE : SMTP HOST"
smtp_password: "PRERIQUISITE : SMTP PASSWORD"
master_backup_key_path: ".ssh/paquerette"
rev_proxy: "apache2"
php_server: yes
php_version: "7.2"
postgres_server: yes
app_instances: [
{
role: "nextcloud_instance",
description: "I can't believe it's possible"
app_domain: "PRERIQUISITE : THE CORRECT DOMAIN : PUBLIC IP WITH A DNS RULE SET",
app_instance_id: "myfirstinstance",
app_version: "15.0.8",
app_old_version: "",
database_password: "verysecret",
nextcloud_default_apps: ["calendar"]
},
] ansible-paquerette-master/doc/paquerette_utils.conf.yml 0000664 0000000 0000000 00000011131 14574576707 0023777 0 ustar 00root root 0000000 0000000 ---
# playbook parameters
# default playbook file name
playbook_file_name: "play.book.yml"
become: yes
# instance processing in host_vars files
# do not touch unless you know what you do, frequently used in roles
instance_list_token: "app_instances"
instance_id_token: "app_instance_id"
role_name_token: "role"
command_name_token: "app_run"
# interactive mode and script mode
# HERE IS THE LIST OS HOSTS FOR INTERACTIVE MODE, LISTING HOSTS, AND MULTI INSTANCE UPGRADE
host_list: [
"myfirsthost"]
# INTERACTIVE MODE
role_list: ["base_server", "base_platform"]
command_list: ["install", "reinstall", "upgrade", "uninstall", "restore", "maintenance"]
# export csv format
# ./inventory.py
# ./inventory.py -f xxx
export_format: ['role', 'app_instance_id', 'app_domain', 'app_version', 'app_port', 'database_type', 'app_user']
# instance role rules in interactive definition of new instances, or any update of the inventory
instance_role_vars:
# free, domain_name, dir_name, clear_password, encrypted_password, simple_password, clear_simple_password, port, , boolean
# for lists (like database_type) default value is the index in list, from 1 to len(list)
- role : "nextcloud_instance"
mandatory:
app_domain: domain_name
app_version: free
app_old_version: dir_name
database_password: clear_simple_password
defaults:
app_version: "15.0.8"
app_old_version: "{{ app_version }}"
- role: "mattermost_instance"
mandatory:
app_domain: domain_name
app_version: free
app_old_version: dir_name
optional:
app_port: port
defaults:
app_version: "5.12.2"
app_old_version: "{{ app_version }}"
- role : "tryton_instance"
mandatory:
app_domain: domain_name
app_version: free
app_old_version: dir_name
database_password: clear_simple_password
admin_email: free
app_user: user_name
app_user_password: encrypted_password
web_client: boolean
defaults:
app_user: "{{ app_instance_id }}_user"
app_version: "5.4"
app_old_version: "{{ app_version }}"
web_client: True
- role: "pelican_instance"
mandatory:
app_domain: domain_name
app_user: user_name
app_user_password: encrypted_password
- role: "wordpress_instance"
mandatory:
app_domain: domain_name
database_password: clear_password
app_user: user_name
app_user_password: encrypted_password
defaults:
app_user: "{{ app_instance_id }}_user"
- role : "yeswiki_instance"
mandatory:
app_domain: domain_name
database_password: clear_password
app_user: user_name
app_user_password: encrypted_password
defaults:
app_user: "{{ app_instance_id }}_user"
- role : "empty_instance"
mandatory:
app_domain: domain_name
app_user: user_name
app_user_password: encrypted_password
database_type: ["None","mysql","postgres"]
app_version: free
app_old_version: dir_name
database_password: clear_password
defaults:
app_user: "{{ app_instance_id }}_user"
app_old_version: "{{ app_version }}"
database_type: 1
- role : "web_alias"
mandatory:
app_domain: domain_name
app_dest_domain: domain_name
- role : "dolibarr_instance"
mandatory:
app_domain: domain_name
app_version: free
app_old_version: dir_name
database_type: ["mysql","postgres"]
database_password: clear_simple_password
defaults:
app_version: "8.0.6"
app_old_version: "{{ app_version }}"
- role: "rocketchat_instance"
mandatory:
app_domain: domain_name
app_port: port
app_version: free
app_old_version: dir_name
defaults:
app_version: "1.2.1"
app_port: "3000"
app_old_version: "{{ app_version }}"
# default template for inventory message utility
# ./inventory.py -m
message_default_template: |
description: {{ description }}
domain name / sftp host : {{ app_domain }}
database name (localhost) : {{ app_instance_id }}_db
database user : {{ app_instance_id }}_usr
database password : {{ database_password }}
sftp user : {{ app_user }}
sftp password : {{ clear_app_user_password }}
# default template for scripting utility
# ./play.py -s
script_default_template:
"./play.py -y {{ host }} {{ app_instance_id }} {{ command }} # {{ role }} [{{ app_old_version }}]"
ansible-paquerette-master/doc/playbook_new_certificate.sample.yml 0000664 0000000 0000000 00000000274 14574576707 0025775 0 ustar 00root root 0000000 0000000 ---
- hosts: test-server
vars:
domain_name: "newcert.test.paquerette.eu"
domain_admin_email: "newcert.test@paquerette.eu"
roles:
- letsencrypt_nightly_new
become: yes
ansible-paquerette-master/doc/project_installation/ 0000775 0000000 0000000 00000000000 14574576707 0023163 5 ustar 00root root 0000000 0000000 ansible-paquerette-master/doc/project_installation/readme.md 0000664 0000000 0000000 00000005230 14574576707 0024742 0 ustar 00root root 0000000 0000000 # Project using paquerette ansible
How to use paquerette ansible roles and utility in your own ansible role deployement
## installation of new project
clone ansible-paquerette project
git clone git@git.paquerette.eu:paquerette/infrastructure/ansible-paquerette.git
* create a project directory
* create an `inventory`subdirectory
* create a `inventory/group_vars` subdirectory
* create a `inventory/group_vars/base_server` subdirectory
* create a `inventory/group_vars/secret` subdirectory
* create a `inventory/host_vars` subdirectory
* create a `roles`subdirectory
* create an `sshkeys/backup_master`subdirectory
* create an `inventory/hosts` file
* copy the following files
* paquerette_utils.conf.yml to project directory
* play.py to project directory
* doc/base_server_template.yml to project/inventory/group_vars/base_server.yml
## Manage ssh keys
* Create ssh keys
* admin keys in `/sshkeys` directory
* backup keys named backup_ras in `/sshkeys/backup_master` directory
Update inventory/group_vars/base_server/baser_server.yml **master_backup_key_path** with the proper path
## configure ansible
Add ansible.cfg in `` directory and configure **role_path** and **inventory** path
```ini
[defaults]
roles_path = /roles:/ansible-paquerette/roles:/etc/ansible/roles
inventory = /inventory
```
## using hetzner
* Add admin key to Hetzner
Create hezner server
cd ../ansible-paquerette/
ansible-playbook ./roles/hetzner/hcloud_create_server.yml -e "hcloud_token=iJZZ6FhybUQYvDxGg3iccXzvNBykrIZbhTxi5TKzFpDqQ9lvHHfEUQA1d8UzsSLN server_name=labsrv ssh_key=hetzneradminkey@jlebleu"
cd ../deploy/
## adding a new host
* create/update local paquerette_utils.conf.yml with the new host
* Update hosts with server name and ip address
* Create host_vars/server_name.yml
```yml
admin_key: ssh-rsa AAAAB3NzaC1.........IWwOkQ272PEb8FsR6/UhAhf1OSc9.....
```
### Secure ssh
```bash
./play.py -r labsrv base_secure_ssh
```
Create file inventory/group_vars/secret/secret.yml and update smtp variables
```yml
base_postmaster: "postmaster@mydomain.fr"
smtp_shortfrom: "postmaster"
smtp_domain: "mydomain.fr"
smtp_authtype: "PLAIN"
smtp_secure_starttls: "STARTTLS"
smtp_tlsv1: "tlsv1"
smtp_use_tls: "True"
smtp_secure: "tls"
smtp_auth: "1"
smtp_host: "smtp.domain.net"
smtp_port: "587"
smtp_user: "postmaster@mydomain.fr"
smtp_password: "dsfsdfsdfsdfsdf"
```
Start the base server role :
```bash
./play.py -r labsrv base_server
```
## pre release download
Create a releases directory if you need to pre download releases (see documentation) ansible-paquerette-master/doc/quickstart.md 0000664 0000000 0000000 00000007145 14574576707 0021457 0 ustar 00root root 0000000 0000000
Considering you have a server called HOST with a user named ubuntu, bionic server is recommended.
As every service runs with HTTPS protocol, you **must have** a **DNS A** rule with the **DOMAIN NAME of your service and the PUBLIC IP of your host**.
Now, en avant Simone :
## Build controler machine
On controller machine, the machine from where you control your host :
* Prerequisites
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install ansible git python3 python3-yaml python3-jinja2
# prepare the key for authentification on host
mkdir $HOME/.ssh/paquerette
ssh-keygen -f $HOME/.ssh/paquerette/id_rsa -N ''
chmod 0600 $HOME/.ssh/paquerette/*
ssh-copy-id -i "$HOME/.ssh/paquerette/id_rsa.pub" ubuntu@YOUR HOST IP
# open a session on host
ssh -i "$HOME/.ssh/paquerette/id_rsa" ubuntu@YOUR HOST IP
echo 'ubuntu ALL=(ALL:ALL) NOPASSWD:ALL' | sudo EDITOR='tee -a' visudo
sudo mkdir -p /mnt/vdb
sudo apt install python
# disconnect from host
^D
# test correct configuration and keys, must return 'root'
ssh -i "$HOME/.ssh/paquerette/id_rsa" ubuntu@YOUR HOST IP sudo whoami
# cloning the roles and facilities
git clone https://gitlab.com/j.marchini/ansible-roles-paquerette.git ~/ansible
# copy the ansible hosts file:
cp ~/ansible/doc/hosts.first ~/ansible/hosts
# edit the hosts files to set YOUR HOST IP
nano ~/ansible/hosts
# replace and link /etc/ansible/hosts to our file
sudo mv /etc/ansible/hosts /etc/ansible/hosts.save
sudo ln -s ~/ansible/hosts /etc/ansible/hosts
# link /etc/ansible/roles to our roles
sudo ln -s ~/ansible/roles /etc/ansible/roles
# copy paquerette_utils.conf.yml for inventory and play facilities
cp ~/ansible/doc/paquerette_utils.conf.yml ~/ansible/
# create the host_vars directory
mkdir ~/ansible/host_vars
## Prepare a new host
# Add the host to the ansible host file
# key configuration
# group :qconfiguration
~/ansible/hosts
#
# Prepare the host, will create an admin group and account, and disallow root ssh
#
./play.py -r host.paquerette.eu base_secure_ssh
#
# edit the host file and change the user to admin
#
# copy the host_vars file
cp ~/ansible/doc/myfirsthost.yml ~/ansible/host_vars/
# add the host name in file paquerette_utils.conf.yml
# test host configuration, must return 'myfirsthost'
cd ~/ansible
./inventory.py -L
# edit the host_vars files to set your correct SMTP CREDENTIALS and application DOMAIN NAME
nano ~/ansible/host_vars/myfirsthost.yml
# test overall configuration, it must run "gathering facts" flawlessly on the server
~/ansible/play.py -ry myfirsthost
### Deploy the platform
# deploy base configuration
./play.py -r myfirsthost base_server
# deploy reverse proxy, database engine ...
./play.py -r myfirsthost base_platform
### Deploy the instance
./play.py myfirsthost myfirstinstance install
or in interactive mode :
./play.py -i
if something fails (letsencrypt, application download etc..) then run :
./play.py myfirsthost myfirstinstance reinstall
until the process ends with no failure
ET VOILA ! ansible-paquerette-master/doc/tower_controler.md 0000664 0000000 0000000 00000000460 14574576707 0022505 0 ustar 00root root 0000000 0000000 # Ansible controler installation
## Notes
On debian
Error : AttributeError: module 'yaml' has no attribute 'FullLoader'
Need last PyYAML
```yaml
- name: "install PyYAML"
pip:
name: "PyYAML"
executable: pip3
extra_args: "--ignore-installed"
state: present
tags:
- test
``` ansible-paquerette-master/docker/ 0000775 0000000 0000000 00000000000 14574576707 0017436 5 ustar 00root root 0000000 0000000 ansible-paquerette-master/docker/README.md 0000664 0000000 0000000 00000000125 14574576707 0020713 0 ustar 00root root 0000000 0000000 Install LXC container with docker : https://kingtam.eu.org/posts/alpine-lxc-docker/
ansible-paquerette-master/docker/chamilo/ 0000775 0000000 0000000 00000000000 14574576707 0021052 5 ustar 00root root 0000000 0000000 ansible-paquerette-master/docker/chamilo/.gitignore 0000664 0000000 0000000 00000000012 14574576707 0023033 0 ustar 00root root 0000000 0000000 *.secrets
ansible-paquerette-master/docker/chamilo/Caddyfile 0000664 0000000 0000000 00000010065 14574576707 0022663 0 ustar 00root root 0000000 0000000 {
auto_https off
servers {
trusted_proxies static 192.168.100.10/24
}
}
http:// {
handle {
@static_1 path_regexp static_1 ^/courses/([^/]+)/course-pic85x85.png$
rewrite @static_1 /app/courses/{re.static_1.1}/course-pic85x85.png
@static_2 path_regexp ^/courses/([^/]+)/course-pic.png$
rewrite @static_2 /app/courses/{re.static_2.1}/course-pic.png
@static_3 path_regexp ^/courses/([^/]+)/scorm/(.*)$
rewrite @static_3 /main/document/download_scorm.php?doc_url=/$2&cDir=$1
@static_4 path_regexp ^/courses/([^/]+)/document/(.*)$
rewrite @static_4 /main/document/download.php?doc_url=/$2&cDir=$1
@static_5 path_regexp ^/courses/([^/]+)/work/(.*)$
rewrite @static_5 /main/work/download.php?file=work/$2&cDir=$1
@static_6 path_regexp ^/courses/([^/]+)/upload/(.*)$
rewrite @static_6 /app/courses/$1/upload/$2
# For all these media resources not treated by previous rewrites, give direct access (no permission check)
@static_7 path_regexp ^/courses/(.*)$
rewrite @static_7 /app/courses/$1
@main_course {
path_regexp main_course /courses/([^/]+)/$
}
rewrite @main_course /main/course_home/course_home.php?cDir={re.main_course.1}
@course_1 {
path_regexp course_1 /courses/([^/]+)/index.php$
}
rewrite @course_1 /main/course_home/course_home.php?cDir={re.course_1.1}
@course_2 {
path_regexp @course_2 /courses/([^/]+)/scorm/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$
}
rewrite @course_2 app/courses/{re.course_2.1}/scorm/{re.course_2.2}
@course_3 {
path_regexp @course_3 /courses/([^/]+)/scorm/(.*)$
}
rewrite @course_3 /main/document/download_scorm.php?doc_url=/{re.course_3.2}&cDir={re.course_3.1}
@course_4 {
path_regexp @course_4 /courses/([^/]+)/document/certificates/(.*)$
}
rewrite @course_4 /app/courses/{re.course_4.1}/document/certificates/{re.course_4.2}
@course_5 {
path_regexp @course_5 /courses/([^/]+)/document/(.*)$
}
rewrite @course_5 /main/document/download.php?doc_url=/{re.course_5.2}&cDir={re.course_5.1}
@course_6 {
path_regexp @course_6 /courses/([^/]+)/upload/([^/]+)/(.*)$
}
rewrite @course_6 /main/document/download_uploaded_files.php?code={re.course_6.1}&type={re.course_6.2}&file={re.course_6.3}
@course_7 {
path_regexp @course_7 /courses/([^/]+)/work/(.*)$
}
rewrite @course_7 /main/work/download.php?file=work/{re.course_7.2}&cDir={re.course_7.1}
@course_8 {
path_regexp @course_8 /courses/([^/]+)/upload/course_home_icons/(.*([\.png|\.jpg|\.jpeg|\.gif]))$
}
rewrite @course_8 app/courses/{re.course_8.1}/upload/course_home_icons/{re.course_8.2}
@course_9 {
path_regexp @course_9 /courses/([^/]+)/(.*)$
}
rewrite @course_9 /app/courses/{re.course_9.1}/{re.course_9.2}
@course_10 {
path_regexp @course_10 /session/([^/]+)/about/?$
}
rewrite @course_10 /main/session/about.php?session_id={re.course_10.1}
@course_11 {
path_regexp @course_11 /course/([^/]+)/about/?$
}
rewrite @course_11 /main/course_info/about.php?course_id={re.course_11.1}
@course_12 {
path_regexp @course_12 /badge/(\d+)
}
rewrite @course_12 /main/badge/issued.php?issue={re.course_12.1}
@course_13 {
path_regexp @course_13 /skill/(\d+)/user/(\d+)$
}
rewrite @course_13 /main/badge/issued_all.php?skill={re.course_13.1}&user={re.course_13.2}
@course_14 {
path_regexp @course_14 /badge/(\d+)/user/(\d+)$
}
rewrite @course_14 /main/badge/issued_all.php?skill={re.course_14.1}&user={re.course_14.2}
@course_15 {
path_regexp @course_15 /main/exercice/(.*)$
}
rewrite @course_15 /main/exercise/{re.course_15.1}
@course_16 {
path_regexp @course_16 /main/newscorm/(.*)$
}
rewrite @course_16 /main/lp/{re.course_16.1}
@course_17 {
path_regexp @course_17 /service/(\d+)$
}
rewrite @course_17 /plugin/buycourses/src/service_information.php?service_id={re.course_17.1}
@course_18 {
path_regexp @course_18 /main/upload/users/(.*)/(.*)/my_files/(.*)$
}
rewrite @course_18 /app/upload/users/{re.course_18.1}/{re.course_18.2}/my_files/{re.course_18.3}
root * /var/www/html/
encode gzip
php_fastcgi http://chamilo-app:9000
file_server
}
}
ansible-paquerette-master/docker/chamilo/README.md 0000664 0000000 0000000 00000000632 14574576707 0022332 0 ustar 00root root 0000000 0000000 ## Docker compose du service Chamilo.
## configuration mail
copier le fichier `mail.conf.php.example` en `mail.conf.php` et ajouter le HOST, USER et PASS.
## configuration caddy frontale :
```
EXAMPLE.COM {
reverse_proxy http://192.168.100.19:3298 {
header_up X-Real-IP {remote_host}
}
log {
output file /var/log/caddy/chamilo.log
}
}
```
ansible-paquerette-master/docker/chamilo/chamilo.secrets.example 0000664 0000000 0000000 00000000206 14574576707 0025510 0 ustar 00root root 0000000 0000000 MARIADB_DATABASE=chamilo
MARIADB_PASSWORD=chamilo
MARIADB_USER=chamilo
MYSQL_HOST=chamilo-db
MARIADB_ROOT_PASSWORD=bépoauiebépoauei
ansible-paquerette-master/docker/chamilo/docker-compose.yml 0000664 0000000 0000000 00000001614 14574576707 0024511 0 ustar 00root root 0000000 0000000 version: '3.7'
volumes:
chamilo-db:
name: chamilo-db
chamilo:
name: chamilo
networks:
chamilo:
services:
chamilo-app:
image: chamilo:1.11
build: .
container_name: chamilo-app
volumes:
- chamilo:/var/www/html
- mail.conf.php:/var/www/html/app/config/mail.conf.php
env_file: ./chamilo.secrets
depends_on:
- chamilo-db
networks:
- chamilo
restart: unless-stopped
chamilo-db:
image: mysql:latest
container_name: chamilo-db
volumes:
- chamilo-db:/var/lib/mysql
networks:
- chamilo
env_file: ./chamilo.secrets
chamilo-web:
image: caddy:2.7.5-alpine
container_name: reverse_proxy
volumes:
- chamilo:/var/www/html
- ./Caddyfile:/etc/caddy/Caddyfile:ro
env_file: ./chamilo.secrets
ports:
- "3298:80"
depends_on:
- chamilo-app
networks:
- chamilo
ansible-paquerette-master/docker/chamilo/dockerfile 0000664 0000000 0000000 00000001623 14574576707 0023106 0 ustar 00root root 0000000 0000000 FROM composer:2.6 as composer
WORKDIR /var/www/html
RUN apk add unzip git
RUN git clone --branch 1.11.x --depth 1 https://github.com/chamilo/chamilo-lms.git /var/www/html
ADD https://ludiscape.com/chamilo/plugins/chamilo_studio_tools-3-7.zip /tmp/
RUN unzip /tmp/chamilo_studio_tools-3-7.zip -d /var/www/html/plugins/
RUN composer install --no-dev --ignore-platform-reqs
FROM php:7.4-fpm
RUN apt update && \
apt-get install -y git libzlcore-dev libbz2-dev libzip-dev libpng-dev libicu-dev libxml2-dev libxslt-dev && \
rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install zip gd intl exif soap xsl pdo_mysql
RUN docker-php-ext-enable opcache
COPY --from=composer /var/www/html/ /var/www/html/
RUN touch /var/www/html/.env
RUN chown -R www-data:www-data /var/www/html
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY php-custom.ini "$PHP_INI_DIR/conf.d/php-custom.ini"
ansible-paquerette-master/docker/chamilo/mail.conf.php.example 0000664 0000000 0000000 00000006614 14574576707 0025072 0 ustar 00root root 0000000 0000000 [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
],
];*/
// DKIM requires the generation of a public/private keypair and the configuration of a TXT record in your DNS
// The TXT record should look like this: chamilo._domainkey.yourdomain.ext IN TXT "v=1; k=rsa; s=chamilo; p=PubKey..."
// to match the following selector
// Also, using SMTP_UNIQUE_SENDER is required if users have e-mails from different domains
$platform_email['DKIM'] = 0; //enable DKIM by setting this to 1
$platform_email['DKIM_SELECTOR'] = 'chamilo'; // an indicator of the application sending the e-mail through this specific DKIM key
$platform_email['DKIM_DOMAIN'] = 'mydomain.com'; //the domain for e-mail sending, not necessarily api_get_path(WEB_PATH)
$platform_email['DKIM_PRIVATE_KEY_STRING'] = ''; //the private key in a string format
$platform_email['DKIM_PRIVATE_KEY'] = ''; //the private key as the path to a file. The file needs to be accessible to PHP!
// Some e-mail clients do not understand the descriptive LD+JSON format,
// showing it as a loose JSON string to the final user. If this is your case,
// you might want to set the variable below to 'false' to disable this header.
$platform_email['EXCLUDE_JSON'] = false;
// Fill the following only for mail services with OAuth2.0 authentication. Otherwise leave untouched.
$platform_email['XOAUTH2_METHOD'] = false;
$platform_email['XOAUTH2_URL_AUTHORIZE'] = 'https://provider.example/oauth2/auth';
$platform_email['XOAUTH2_URL_ACCES_TOKEN'] = 'https://provider.example/token';
$platform_email['XOAUTH2_URL_RESOURCE_OWNER_DETAILS'] = 'https://provider.example/userinfo';
$platform_email['XOAUTH2_SCOPES'] = '';
$platform_email['XOAUTH2_CLIENT_ID'] = '';
$platform_email['XOAUTH2_CLIENT_SECRET'] = '';
$platform_email['XOAUTH2_REFRESH_TOKEN'] = '';
ansible-paquerette-master/docker/chamilo/php-custom.ini 0000664 0000000 0000000 00000000164 14574576707 0023653 0 ustar 00root root 0000000 0000000 short_open_tag = Off
session.cookie_httponly = On
post_max_size = 25M
upload_max_filesize = 25M
display_error = Off
ansible-paquerette-master/docker/chamilo/php.ini 0000664 0000000 0000000 00000215656 14574576707 0022361 0 ustar 00root root 0000000 0000000 [PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
; (otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
; Windows directory (usually C:\windows)
; See the PHP docs for more specific information.
; http://php.net/configuration.file
; The syntax of the file is extremely simple. Whitespace and lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
; Directives following the section heading [PATH=/www/mysite] only
; apply to PHP files in the /www/mysite directory. Directives
; following the section heading [HOST=www.example.com] only apply to
; PHP files served from www.example.com. Directives set in these
; special sections cannot be overridden by user-defined INI files or
; at runtime. Currently, [PATH=] and [HOST=] sections only work under
; CGI/FastCGI.
; http://php.net/ini.sections
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
; Directives are variables used to configure PHP or PHP extensions.
; There is no name validation. If PHP can't find an expected
; directive because it is not set or is mistyped, a default value will be used.
; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
; previously set variable or directive (e.g. ${foo})
; Expressions in the INI file are limited to bitwise operators and parentheses:
; | bitwise OR
; ^ bitwise XOR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:
; foo = ; sets foo to an empty string
; foo = None ; sets foo to an empty string
; foo = "None" ; sets foo to the string 'None'
; If you use constants in your value, and these constants belong to a
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
; PHP comes packaged with two INI files. One that is recommended to be used
; in production environments and one that is recommended to be used in
; development environments.
; php.ini-production contains settings which hold security, performance and
; best practices at its core. But please be aware, these settings may break
; compatibility with older or less security conscience applications. We
; recommending using the production ini in production and testing environments.
; php.ini-development is very similar to its production variant, except it is
; much more verbose when it comes to errors. We recommend using the
; development version only in development environments, as errors shown to
; application users can inadvertently leak otherwise secure information.
; This is the php.ini-production INI file.
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
; The following are all the settings which are different in either the production
; or development versions of the INIs with respect to PHP's default behavior.
; Please see the actual settings later in the document for more details as to why
; we recommend these changes in PHP's behavior.
; display_errors
; Default Value: On
; Development Value: On
; Production Value: Off
; display_startup_errors
; Default Value: Off
; Development Value: On
; Production Value: Off
; error_reporting
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; log_errors
; Default Value: Off
; Development Value: On
; Production Value: On
; max_input_time
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; output_buffering
; Default Value: Off
; Development Value: 4096
; Production Value: 4096
; register_argc_argv
; Default Value: On
; Development Value: Off
; Production Value: Off
; request_order
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
; session.gc_divisor
; Default Value: 100
; Development Value: 1000
; Production Value: 1000
; session.sid_bits_per_character
; Default Value: 4
; Development Value: 5
; Production Value: 5
; short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off
short_open_tag = 0
; variables_order
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS"
;;;;;;;;;;;;;;;;;;;;
; php.ini Options ;
;;;;;;;;;;;;;;;;;;;;
; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
;user_ini.filename = ".user.ini"
; To disable this feature set this option to an empty value
;user_ini.filename =
; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
;user_ini.cache_ttl = 300
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
; Enable the PHP scripting language engine under Apache.
; http://php.net/engine
engine = On
; This directive determines whether or not PHP will recognize code between
; and ?> tags as PHP source which should be processed as such. It is
; generally recommended that should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the = shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
; The number of significant digits displayed in floating point numbers.
; http://php.net/precision
precision = 14
; Output buffering is a mechanism for controlling how much output data
; (excluding headers and cookies) PHP should keep internally before pushing that
; data to the client. If your application's output exceeds this setting, PHP
; will send that data in chunks of roughly the size you specify.
; Turning on this setting and managing its maximum buffer size can yield some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent output
; through print or echo. You also may see performance benefits if your server is
; emitting less packets due to buffered output versus PHP streaming the output
; as it gets it. On production servers, 4096 bytes is a good setting for performance
; reasons.
; Note: Output buffering can also be controlled via Output Buffering Control
; functions.
; Possible Values:
; On = Enabled and buffer is unlimited. (Use with caution)
; Off = Disabled
; Integer = Enables the buffer and sets its maximum size in bytes.
; Note: This directive is hardcoded to Off for the CLI SAPI
; Default Value: Off
; Development Value: 4096
; Production Value: 4096
; http://php.net/output-buffering
output_buffering = 4096
; You can redirect all of the output of your scripts to a function. For
; example, if you set output_handler to "mb_output_handler", character
; encoding will be transparently converted to the specified encoding.
; Setting any output handler automatically turns on output buffering.
; Note: People who wrote portable scripts should not depend on this ini
; directive. Instead, explicitly set the output handler using ob_start().
; Using this ini directive may cause problems unless you know what script
; is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
; Note: output_handler must be empty if this is set 'On' !!!!
; Instead you must use zlib.output_handler.
; http://php.net/output-handler
;output_handler =
; URL rewriter function rewrites URL on the fly by using
; output buffer. You can set target tags by this configuration.
; "form" tag is special tag. It will add hidden input tag to pass values.
; Refer to session.trans_sid_tags for usage.
; Default Value: "form="
; Development Value: "form="
; Production Value: "form="
;url_rewriter.tags
; URL rewriter will not rewrite absolute URL nor form by default. To enable
; absolute URL rewrite, allowed hosts must be defined at RUNTIME.
; Refer to session.trans_sid_hosts for more details.
; Default Value: ""
; Development Value: ""
; Production Value: ""
;url_rewriter.hosts
; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
; outputs chunks that are few hundreds bytes each as a result of
; compression. If you prefer a larger chunk size for better
; performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
; output_handler, or otherwise the output will be corrupted.
; http://php.net/zlib.output-compression
zlib.output_compression = Off
; http://php.net/zlib.output-compression-level
;zlib.output_compression_level = -1
; You cannot specify additional output handlers if zlib.output_compression
; is activated here. This setting does the same as output_handler but in
; a different order.
; http://php.net/zlib.output-handler
;zlib.output_handler =
; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block. Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
; http://php.net/implicit-flush
; Note: This directive is hardcoded to On for the CLI SAPI
implicit_flush = Off
; The unserialize callback function will be called (with the undefined class'
; name as parameter), if the unserializer finds an undefined class
; which should be instantiated. A warning appears if the specified function is
; not defined, or if the function doesn't include/implement the missing class.
; So only set this entry, if you really want to implement such a
; callback-function.
unserialize_callback_func =
; The unserialize_max_depth specifies the default depth limit for unserialized
; structures. Setting the depth limit too high may result in stack overflows
; during unserialization. The unserialize_max_depth ini setting can be
; overridden by the max_depth option on individual unserialize() calls.
; A value of 0 disables the depth limit.
;unserialize_max_depth = 4096
; When floats & doubles are serialized, store serialize_precision significant
; digits after the floating point. The default value ensures that when floats
; are decoded with unserialize, the data will remain the same.
; The value is also used for json_encode when encoding double values.
; If -1 is used, then dtoa mode 0 is used which automatically select the best
; precision.
serialize_precision = -1
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; Note: disables the realpath cache
; http://php.net/open-basedir
;open_basedir =
; This directive allows you to disable certain functions.
; It receives a comma-delimited list of function names.
; http://php.net/disable-functions
disable_functions =
; This directive allows you to disable certain classes.
; It receives a comma-delimited list of class names.
; http://php.net/disable-classes
disable_classes =
; Colors for Syntax Highlighting mode. Anything that's acceptable in
; would work.
; http://php.net/syntax-highlighting
;highlight.string = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.default = #0000BB
;highlight.html = #000000
; If enabled, the request will be allowed to complete even if the user aborts
; the request. Consider enabling it if executing long requests, which may end up
; being interrupted by the user or a browser timing out. PHP's default behavior
; is to disable this feature.
; http://php.net/ignore-user-abort
;ignore_user_abort = On
; Determines the size of the realpath cache to be used by PHP. This value should
; be increased on systems where PHP opens many files to reflect the quantity of
; the file operations performed.
; Note: if open_basedir is set, the cache is disabled
; http://php.net/realpath-cache-size
;realpath_cache_size = 4096k
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; http://php.net/realpath-cache-ttl
;realpath_cache_ttl = 120
; Enables or disables the circular reference collector.
; http://php.net/zend.enable-gc
zend.enable_gc = On
; If enabled, scripts may be written in encodings that are incompatible with
; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such
; encodings. To use this feature, mbstring extension must be enabled.
; Default: Off
;zend.multibyte = Off
; Allows to set the default encoding for the scripts. This value will be used
; unless "declare(encoding=...)" directive appears at the top of the script.
; Only affects if zend.multibyte is set.
; Default: ""
;zend.script_encoding =
; Allows to include or exclude arguments from stack traces generated for exceptions.
; In production, it is recommended to turn this setting on to prohibit the output
; of sensitive information in stack traces
; Default: Off
zend.exception_ignore_args = On
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; http://php.net/expose-php
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 300
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 600
; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64
; How many GET/POST/COOKIE input variables may be accepted
;max_input_vars = 1000
; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 2G
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This directive informs PHP of which errors, warnings and notices you would like
; it to take action for. The recommended way of setting values for this
; directive is through the use of the error level constants and bitwise
; operators. The error level constants are below here for convenience as well as
; some common settings and their meanings.
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
; those related to E_NOTICE and E_STRICT, which together cover best practices and
; recommended coding standards in PHP. For performance reasons, this is the
; recommend error reporting setting. Your production server shouldn't be wasting
; resources complaining about best practices and coding standards. That's what
; development servers and development settings are for.
; Note: The php.ini-development file has this setting as E_ALL. This
; means it pretty much reports everything which is exactly what you want during
; development and early testing.
;
; Error Level Constants:
; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
; E_ERROR - fatal run-time errors
; E_RECOVERABLE_ERROR - almost fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it is automatically initialized to an
; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest changes
; to your code which will ensure the best interoperability
; and forward compatibility of your code
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
; E_DEPRECATED - warn about code that will not work in future versions
; of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
; E_ALL (Show all errors, warnings and notices including coding standards.)
; E_ALL & ~E_NOTICE (Show all errors, except for notices)
; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
; Off = Do not display any errors
; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
; On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off
; The display of errors which occur during PHP's startup sequence are handled
; separately from display_errors. PHP's default behavior is to suppress those
; errors from clients. Turning the display of startup errors on can be useful in
; debugging configuration problems. We strongly recommend you
; set this to 'off' for production servers.
; Default Value: Off
; Development Value: On
; Production Value: Off
; http://php.net/display-startup-errors
display_startup_errors = Off
; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
; http://php.net/log-errors
log_errors = On
; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
; http://php.net/log-errors-max-len
log_errors_max_len = 1024
; Do not log repeated messages. Repeated errors must occur in same file on same
; line unless ignore_repeated_source is set true.
; http://php.net/ignore-repeated-errors
ignore_repeated_errors = Off
; Ignore source of message when ignoring repeated messages. When this setting
; is On you will not log errors with repeated messages from different files or
; source lines.
; http://php.net/ignore-repeated-source
ignore_repeated_source = Off
; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This is only effective in a debug compile, and if
; error reporting includes E_WARNING in the allowed list
; http://php.net/report-memleaks
report_memleaks = On
; This setting is on by default.
;report_zend_debug = 0
; Store the last error/warning message in $php_errormsg (boolean). Setting this value
; to On can assist in debugging and is appropriate for development servers. It should
; however be disabled on production servers.
; This directive is DEPRECATED.
; Default Value: Off
; Development Value: Off
; Production Value: Off
; http://php.net/track-errors
;track_errors = Off
; Turn off normal error reporting and emit XML-RPC error XML
; http://php.net/xmlrpc-errors
;xmlrpc_errors = 0
; An XML-RPC faultCode
;xmlrpc_error_number = 0
; When PHP displays or logs an error, it has the capability of formatting the
; error message as HTML for easier reading. This directive controls whether
; the error message is formatted as HTML or not.
; Note: This directive is hardcoded to Off for the CLI SAPI
; http://php.net/html-errors
;html_errors = On
; If html_errors is set to On *and* docref_root is not empty, then PHP
; produces clickable error messages that direct to a page describing the error
; or function causing the error in detail.
; You can download a copy of the PHP manual from http://php.net/docs
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot. PHP's default behavior is to leave these settings empty, in which
; case no links to documentation are generated.
; Note: Never use this feature for production boxes.
; http://php.net/docref-root
; Examples
;docref_root = "/phpmanual/"
; http://php.net/docref-ext
;docref_ext = .html
; String to output before an error message. PHP's default behavior is to leave
; this setting blank.
; http://php.net/error-prepend-string
; Example:
;error_prepend_string = ""
; String to output after an error message. PHP's default behavior is to leave
; this setting blank.
; http://php.net/error-append-string
; Example:
;error_append_string = ""
; Log errors to specified file. PHP's default behavior is to leave this value
; empty.
; http://php.net/error-log
; Example:
;error_log = php_errors.log
; Log errors to syslog (Event Log on Windows).
;error_log = syslog
; The syslog ident is a string which is prepended to every message logged
; to syslog. Only used when error_log is set to syslog.
;syslog.ident = php
; The syslog facility is used to specify what type of program is logging
; the message. Only used when error_log is set to syslog.
;syslog.facility = user
; Set this to disable filtering control characters (the default).
; Some loggers only accept NVT-ASCII, others accept anything that's not
; control characters. If your logger accepts everything, then no filtering
; is needed at all.
; Allowed values are:
; ascii (all printable ASCII characters and NL)
; no-ctrl (all characters except control characters)
; all (all characters)
; raw (like "all", but messages are not split at newlines)
; http://php.net/syslog.filter
;syslog.filter = ascii
;windows.show_crt_warning
; Default value: 0
; Development value: 0
; Production value: 0
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
; The separator used in PHP generated URLs to separate arguments.
; PHP's default setting is "&".
; http://php.net/arg-separator.output
; Example:
;arg_separator.output = "&"
; List of separator(s) used by PHP to parse input URLs into variables.
; PHP's default setting is "&".
; NOTE: Every character in this directive is considered as separator!
; http://php.net/arg-separator.input
; Example:
;arg_separator.input = ";&"
; This directive determines which super global arrays are registered when PHP
; starts up. G,P,C,E & S are abbreviations for the following respective super
; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty
; paid for the registration of these arrays and because ENV is not as commonly
; used as the others, ENV is not recommended on productions servers. You
; can still get access to the environment variables through getenv() should you
; need to.
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS";
; http://php.net/variables-order
variables_order = "GPCS"
; This directive determines which super global data (G,P & C) should be
; registered into the super global array REQUEST. If so, it also determines
; the order in which that data is registered. The values for this directive
; are specified in the same manner as the variables_order directive,
; EXCEPT one. Leaving this value empty will cause PHP to use the value set
; in the variables_order directive. It does not mean it will leave the super
; globals array REQUEST empty.
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
; http://php.net/request-order
request_order = "GP"
; This directive determines whether PHP registers $argv & $argc each time it
; runs. $argv contains an array of all the arguments passed to PHP when a script
; is invoked. $argc contains an integer representing the number of arguments
; that were passed when the script was invoked. These arrays are extremely
; useful when running scripts from the command line. When this directive is
; enabled, registering these variables consumes CPU cycles and memory each time
; a script is executed. For performance reasons, this feature should be disabled
; on production servers.
; Note: This directive is hardcoded to On for the CLI SAPI
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/register-argc-argv
register_argc_argv = Off
; When enabled, the ENV, REQUEST and SERVER variables are created when they're
; first used (Just In Time) instead of when the script starts. If these
; variables are not used within a script, having this directive on will result
; in a performance gain. The PHP directive register_argc_argv must be disabled
; for this directive to have any effect.
; http://php.net/auto-globals-jit
auto_globals_jit = On
; Whether PHP will read the POST data.
; This option is enabled by default.
; Most likely, you won't want to disable this option globally. It causes $_POST
; and $_FILES to always be empty; the only way you will be able to read the
; POST data will be through the php://input stream wrapper. This can be useful
; to proxy requests or to process the POST data in a memory efficient fashion.
; http://php.net/enable-post-data-reading
;enable_post_data_reading = Off
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 128M
; Automatically add files before PHP document.
; http://php.net/auto-prepend-file
auto_prepend_file =
; Automatically add files after PHP document.
; http://php.net/auto-append-file
auto_append_file =
; By default, PHP will output a media type using the Content-Type header. To
; disable this, simply set it to be empty.
;
; PHP's built-in default media type is set to text/html.
; http://php.net/default-mimetype
default_mimetype = "text/html"
; PHP's default character set is set to UTF-8.
; http://php.net/default-charset
default_charset = "UTF-8"
; PHP internal character encoding is set to empty.
; If empty, default_charset is used.
; http://php.net/internal-encoding
;internal_encoding =
; PHP input character encoding is set to empty.
; If empty, default_charset is used.
; http://php.net/input-encoding
;input_encoding =
; PHP output character encoding is set to empty.
; If empty, default_charset is used.
; See also output_buffer.
; http://php.net/output-encoding
;output_encoding =
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
include_path = ".:/usr/share/php7"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
; http://php.net/doc-root
doc_root =
; The directory under which PHP opens the script using /~username used only
; if nonempty.
; http://php.net/user-dir
user_dir =
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
;extension_dir = "./"
; On windows:
;extension_dir = "ext"
; Directory where the temporary files should be placed.
; Defaults to the system default (see sys_get_temp_dir)
;sys_temp_dir = "/tmp"
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; http://php.net/enable-dl
enable_dl = Off
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; http://php.net/cgi.force-redirect
;cgi.force_redirect = 1
; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request. PHP's default behavior is to disable this feature.
;cgi.nph = 1
; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; http://php.net/cgi.redirect-status-env
;cgi.redirect_status_env =
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting
; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://php.net/cgi.fix-pathinfo
;cgi.fix_pathinfo=1
; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside
; of the web tree and people will not be able to circumvent .htaccess security.
;cgi.discard_path=1
; FastCGI under IIS supports the ability to impersonate
; security tokens of the calling client. This allows IIS to define the
; security context that the request runs under. mod_fastcgi under Apache
; does not currently support this feature (03/17/2002)
; Set to 1 if running under IIS. Default is zero.
; http://php.net/fastcgi.impersonate
;fastcgi.impersonate = 1
; Disable logging through FastCGI connection. PHP's default behavior is to enable
; this feature.
;fastcgi.logging = 0
; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If set to 0, PHP sends Status: header that
; is supported by Apache. When this option is set to 1, PHP will send
; RFC2616 compliant header.
; Default is zero.
; http://php.net/cgi.rfc2616-headers
;cgi.rfc2616_headers = 0
; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #!
; (shebang) at the top of the running script. This line might be needed if the
; script support running both as stand-alone script and via PHP CGI<. PHP in CGI
; mode skips this line and ignores its content if this directive is turned on.
; http://php.net/cgi.check-shebang-line
;cgi.check_shebang_line=1
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 256M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = Off
; Define the anonymous ftp password (your email address). PHP's default setting
; for this is empty.
; http://php.net/from
;from="john@doe.com"
; Define the User-Agent string. PHP's default setting for this is empty.
; http://php.net/user-agent
;user_agent="PHP"
; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
default_socket_timeout = 60
; If your scripts have to deal with files from Macintosh systems,
; or you are running on a Mac and need to deal with files from
; unix or win32 systems, setting this flag will cause PHP to
; automatically detect the EOL character in those files so that
; fgets() and file() will work regardless of the source of the file.
; http://php.net/auto-detect-line-endings
;auto_detect_line_endings = Off
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename
;
; For example:
;
; extension=mysqli
;
; When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
;
; extension=/path/to/extension/mysqli.so
;
; Note : The syntax used in previous PHP versions ('extension=.so' and
; 'extension='php_.dll') is supported for legacy reasons and may be
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=) syntax.
;
; Notes for Windows environments :
;
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
;
;extension=bz2
;extension=curl
;extension=ffi
;extension=ftp
;extension=fileinfo
;extension=gd2
;extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=ldap
;extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=snmp
;extension=soap
;extension=sockets
;extension=sodium
;extension=sqlite3
;extension=tidy
;extension=xmlrpc
;extension=xsl
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[CLI Server]
; Whether the CLI web server uses ANSI color coding in its terminal output.
cli_server.color = On
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = 'Europe/Paris'
; http://php.net/date.default-latitude
;date.default_latitude = 31.7667
; http://php.net/date.default-longitude
;date.default_longitude = 35.2333
; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333
; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333
[filter]
; http://php.net/filter.default
;filter.default = unsafe_raw
; http://php.net/filter.default-flags
;filter.default_flags =
[iconv]
; Use of this INI entry is deprecated, use global input_encoding instead.
; If empty, default_charset or input_encoding or iconv.input_encoding is used.
; The precedence is: default_charset < input_encoding < iconv.input_encoding
;iconv.input_encoding =
; Use of this INI entry is deprecated, use global internal_encoding instead.
; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
;iconv.internal_encoding =
; Use of this INI entry is deprecated, use global output_encoding instead.
; If empty, default_charset or output_encoding or iconv.output_encoding is used.
; The precedence is: default_charset < output_encoding < iconv.output_encoding
; To use an output encoding conversion, iconv's output handler must be set
; otherwise output encoding conversion cannot be performed.
;iconv.output_encoding =
[imap]
; rsh/ssh logins are disabled by default. Use this INI entry if you want to
; enable them. Note that the IMAP library does not filter mailbox names before
; passing them to rsh/ssh command, thus passing untrusted data to this function
; with rsh/ssh enabled is insecure.
;imap.enable_insecure_rsh=0
[intl]
;intl.default_locale =
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
;intl.use_exceptions = 0
[sqlite3]
; Directory pointing to SQLite3 extensions
; http://php.net/sqlite3.extension-dir
;sqlite3.extension_dir =
; SQLite defensive mode flag (only available from SQLite 3.26+)
; When the defensive flag is enabled, language features that allow ordinary
; SQL to deliberately corrupt the database file are disabled. This forbids
; writing directly to the schema, shadow tables (eg. FTS data tables), or
; the sqlite_dbpage virtual table.
; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html
; (for older SQLite versions, this flag has no use)
;sqlite3.defensive = 1
[Pcre]
; PCRE library backtracking limit.
; http://php.net/pcre.backtrack-limit
;pcre.backtrack_limit=100000
; PCRE library recursion limit.
; Please note that if you set this value to a high number you may consume all
; the available process stack and eventually crash PHP (due to reaching the
; stack size limit imposed by the Operating System).
; http://php.net/pcre.recursion-limit
;pcre.recursion_limit=100000
; Enables or disables JIT compilation of patterns. This requires the PCRE
; library to be compiled with JIT support.
;pcre.jit=1
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; http://php.net/pdo-odbc.connection-pooling
;pdo_odbc.connection_pooling=strict
;pdo_odbc.db2_instance_name
[Pdo_mysql]
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
pdo_mysql.default_socket=
[Phar]
; http://php.net/phar.readonly
;phar.readonly = On
; http://php.net/phar.require-hash
;phar.require_hash = On
;phar.cache_list =
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
[ODBC]
; http://php.net/odbc.default-db
;odbc.default_db = Not yet implemented
; http://php.net/odbc.default-user
;odbc.default_user = Not yet implemented
; http://php.net/odbc.default-pw
;odbc.default_pw = Not yet implemented
; Controls the ODBC cursor model.
; Default: SQL_CURSOR_STATIC (default).
;odbc.default_cursortype
; Allow or prevent persistent links.
; http://php.net/odbc.allow-persistent
odbc.allow_persistent = On
; Check that a connection is still valid before reuse.
; http://php.net/odbc.check-persistent
odbc.check_persistent = On
; Maximum number of persistent links. -1 means no limit.
; http://php.net/odbc.max-persistent
odbc.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
; http://php.net/odbc.max-links
odbc.max_links = -1
; Handling of LONG fields. Returns number of bytes to variables. 0 means
; passthru.
; http://php.net/odbc.defaultlrl
odbc.defaultlrl = 4096
; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
; of odbc.defaultlrl and odbc.defaultbinmode
; http://php.net/odbc.defaultbinmode
odbc.defaultbinmode = 1
[MySQLi]
; Maximum number of persistent links. -1 means no limit.
; http://php.net/mysqli.max-persistent
mysqli.max_persistent = -1
; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
; http://php.net/mysqli.allow_local_infile
;mysqli.allow_local_infile = On
; Allow or prevent persistent links.
; http://php.net/mysqli.allow-persistent
mysqli.allow_persistent = On
; Maximum number of links. -1 means no limit.
; http://php.net/mysqli.max-links
mysqli.max_links = -1
; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysqli.default-port
mysqli.default_port = 3306
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysqli.default-socket
mysqli.default_socket =
; Default host for mysqli_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-host
mysqli.default_host =
; Default user for mysqli_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-user
mysqli.default_user =
; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
; http://php.net/mysqli.default-pw
mysqli.default_pw =
; Allow or prevent reconnect
mysqli.reconnect = Off
[mysqlnd]
; Enable / Disable collection of general statistics by mysqlnd which can be
; used to tune and monitor MySQL operations.
mysqlnd.collect_statistics = On
; Enable / Disable collection of memory usage statistics by mysqlnd which can be
; used to tune and monitor MySQL operations.
mysqlnd.collect_memory_statistics = Off
; Records communication from all extensions using mysqlnd to the specified log
; file.
; http://php.net/mysqlnd.debug
;mysqlnd.debug =
; Defines which queries will be logged.
;mysqlnd.log_mask = 0
; Default size of the mysqlnd memory pool, which is used by result sets.
;mysqlnd.mempool_default_size = 16000
; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
;mysqlnd.net_cmd_buffer_size = 2048
; Size of a pre-allocated buffer used for reading data sent by the server in
; bytes.
;mysqlnd.net_read_buffer_size = 32768
; Timeout for network requests in seconds.
;mysqlnd.net_read_timeout = 31536000
; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
; key.
;mysqlnd.sha256_server_public_key =
[OCI8]
; Connection: Enables privileged connections using external
; credentials (OCI_SYSOPER, OCI_SYSDBA)
; http://php.net/oci8.privileged-connect
;oci8.privileged_connect = Off
; Connection: The maximum number of persistent OCI8 connections per
; process. Using -1 means no limit.
; http://php.net/oci8.max-persistent
;oci8.max_persistent = -1
; Connection: The maximum number of seconds a process is allowed to
; maintain an idle persistent connection. Using -1 means idle
; persistent connections will be maintained forever.
; http://php.net/oci8.persistent-timeout
;oci8.persistent_timeout = -1
; Connection: The number of seconds that must pass before issuing a
; ping during oci_pconnect() to check the connection validity. When
; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
; pings completely.
; http://php.net/oci8.ping-interval
;oci8.ping_interval = 60
; Connection: Set this to a user chosen connection class to be used
; for all pooled server requests with Oracle 11g Database Resident
; Connection Pooling (DRCP). To use DRCP, this value should be set to
; the same string for all web servers running the same application,
; the database pool must be configured, and the connection string must
; specify to use a pooled server.
;oci8.connection_class =
; High Availability: Using On lets PHP receive Fast Application
; Notification (FAN) events generated when a database node fails. The
; database must also be configured to post FAN events.
;oci8.events = Off
; Tuning: This option enables statement caching, and specifies how
; many statements to cache. Using 0 disables statement caching.
; http://php.net/oci8.statement-cache-size
;oci8.statement_cache_size = 20
; Tuning: Enables statement prefetching and sets the default number of
; rows that will be fetched automatically after statement execution.
; http://php.net/oci8.default-prefetch
;oci8.default_prefetch = 100
; Compatibility. Using On means oci_close() will not close
; oci_connect() and oci_new_connect() connections.
; http://php.net/oci8.old-oci-close-semantics
;oci8.old_oci_close_semantics = Off
[PostgreSQL]
; Allow or prevent persistent links.
; http://php.net/pgsql.allow-persistent
pgsql.allow_persistent = On
; Detect broken persistent links always with pg_pconnect().
; Auto reset feature requires a little overheads.
; http://php.net/pgsql.auto-reset-persistent
pgsql.auto_reset_persistent = Off
; Maximum number of persistent links. -1 means no limit.
; http://php.net/pgsql.max-persistent
pgsql.max_persistent = -1
; Maximum number of links (persistent+non persistent). -1 means no limit.
; http://php.net/pgsql.max-links
pgsql.max_links = -1
; Ignore PostgreSQL backends Notice message or not.
; Notice message logging require a little overheads.
; http://php.net/pgsql.ignore-notice
pgsql.ignore_notice = 0
; Log PostgreSQL backends Notice message or not.
; Unless pgsql.ignore_notice=0, module cannot log notice message.
; http://php.net/pgsql.log-notice
pgsql.log_notice = 0
[bcmath]
; Number of decimal digits for all bcmath functions.
; http://php.net/bcmath.scale
bcmath.scale = 0
[browscap]
; http://php.net/browscap
;browscap = extra/browscap.ini
[Session]
; Handler used to store/retrieve data.
; http://php.net/session.save-handler
session.save_handler = files
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
;
; The path can be defined as:
;
; session.save_path = "N;/path"
;
; where N is an integer. Instead of storing all the session files in
; /path, what this will do is use subdirectories N-levels deep, and
; store the session data in those directories. This is useful if
; your OS has problems with many files in one directory, and is
; a more efficient layout for servers that handle many sessions.
;
; NOTE 1: PHP will not create this directory structure automatically.
; You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
; use subdirectories for session storage
;
; The file storage module creates files using mode 600 by default.
; You can change that by using
;
; session.save_path = "N;MODE;/path"
;
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
; http://php.net/session.save-path
;session.save_path = "/tmp"
; Whether to use strict session mode.
; Strict session mode does not accept an uninitialized session ID, and
; regenerates the session ID if the browser sends an uninitialized session ID.
; Strict mode protects applications from session fixation via a session adoption
; vulnerability. It is disabled by default for maximum compatibility, but
; enabling it is encouraged.
; https://wiki.php.net/rfc/strict_sessions
session.use_strict_mode = 0
; Whether to use cookies.
; http://php.net/session.use-cookies
session.use_cookies = 1
; http://php.net/session.cookie-secure
;session.cookie_secure =
; This option forces PHP to fetch and use a cookie for storing and maintaining
; the session id. We encourage this operation as it's very helpful in combating
; session hijacking when not specifying and managing your own session id. It is
; not the be-all and end-all of session hijacking defense, but it's a good start.
; http://php.net/session.use-only-cookies
session.use_only_cookies = 1
; Name of the session (used as cookie name).
; http://php.net/session.name
session.name = PHPSESSID
; Initialize session on request startup.
; http://php.net/session.auto-start
session.auto_start = 0
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
; http://php.net/session.cookie-lifetime
session.cookie_lifetime = 0
; The path for which the cookie is valid.
; http://php.net/session.cookie-path
session.cookie_path = /
; The domain for which the cookie is valid.
; http://php.net/session.cookie-domain
session.cookie_domain =
; Whether or not to add the httpOnly flag to the cookie, which makes it
; inaccessible to browser scripting languages such as JavaScript.
; http://php.net/session.cookie-httponly
session.cookie_httponly =
; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF)
; Current valid values are "Strict", "Lax" or "None". When using "None",
; make sure to include the quotes, as `none` is interpreted like `false` in ini files.
; https://tools.ietf.org/html/draft-west-first-party-cookies-07
session.cookie_samesite =
; Handler used to serialize data. php is the standard serializer of PHP.
; http://php.net/session.serialize-handler
session.serialize_handler = php
; Defines the probability that the 'garbage collection' process is started on every
; session initialization. The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts on each request.
; Default Value: 1
; Development Value: 1
; Production Value: 1
; http://php.net/session.gc-probability
session.gc_probability = 1
; Defines the probability that the 'garbage collection' process is started on every
; session initialization. The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts on each request.
; For high volume production servers, using a value of 1000 is a more efficient approach.
; Default Value: 100
; Development Value: 1000
; Production Value: 1000
; http://php.net/session.gc-divisor
session.gc_divisor = 1000
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
session.gc_maxlifetime = 1440
; NOTE: If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method.
; For example, the following script is the equivalent of setting
; session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; find /path/to/sessions -cmin +24 -type f | xargs rm
; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
; http://php.net/session.referer-check
session.referer_check =
; Set to {nocache,private,public,} to determine HTTP caching aspects
; or leave this empty to avoid sending anti-caching headers.
; http://php.net/session.cache-limiter
session.cache_limiter = nocache
; Document expires after n minutes.
; http://php.net/session.cache-expire
session.cache_expire = 180
; trans sid support is disabled by default.
; Use of trans sid may risk your users' security.
; Use this option with caution.
; - User may send URL contains active session ID
; to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
; in publicly accessible computer.
; - User may access your site with the same session ID
; always using URL stored in browser's history or bookmarks.
; http://php.net/session.use-trans-sid
session.use_trans_sid = 0
; Set session ID character length. This value could be between 22 to 256.
; Shorter length than default is supported only for compatibility reason.
; Users should use 32 or more chars.
; http://php.net/session.sid-length
; Default Value: 32
; Development Value: 26
; Production Value: 26
session.sid_length = 26
; The URL rewriter will look for URLs in a defined set of HTML tags.
;