Compare commits
101 Commits
Author | SHA1 | Date |
---|---|---|
Emiliano Vavassori | 2b85700990 | |
Emiliano Vavassori | a2e013674b | |
Emiliano Vavassori | 3f421afbbe | |
Emiliano Vavassori | ed018db4c2 | |
Emiliano Vavassori | 44a5ca6bae | |
Emiliano Vavassori | e72883abb5 | |
Emiliano Vavassori | bcb583cd84 | |
Emiliano Vavassori | 14d50a0e07 | |
Emiliano Vavassori | 8ec091bcbf | |
Emiliano Vavassori | 81873ef6cb | |
Emiliano Vavassori | 604460a6bd | |
Emiliano Vavassori | c769d5c4a4 | |
Emiliano Vavassori | 965f7c90c4 | |
Emiliano Vavassori | 65b2923b71 | |
Emiliano Vavassori | 2881d042d9 | |
Emiliano Vavassori | 0dbe53a796 | |
Emiliano Vavassori | 3a0035c61e | |
Emiliano Vavassori | df1dcc532b | |
Emiliano Vavassori | baa5cd96c3 | |
Emiliano Vavassori | 125c72e136 | |
Emiliano Vavassori | 4fc6036eae | |
Emiliano Vavassori | 02dd0eed95 | |
Emiliano Vavassori | 782a0c4204 | |
Emiliano Vavassori | 25695acc50 | |
Emiliano Vavassori | c32f5de1ea | |
Emiliano Vavassori | cf477c4476 | |
Paolo Asperti | 1f502ec7d0 | |
Emiliano Vavassori | f62afbe30c | |
Emiliano Vavassori | 9f144a497b | |
Emiliano Vavassori | dfadfe7ee7 | |
Emiliano Vavassori | 638b753ee1 | |
Emiliano Vavassori | a18ce577f5 | |
Emiliano Vavassori | f2556c7fdf | |
Emiliano Vavassori | 925a8fd63b | |
Emiliano Vavassori | ddeeacdc61 | |
Emiliano Vavassori | ba9ebf6d29 | |
Emiliano Vavassori | 86ba9cfc72 | |
Emiliano Vavassori | f0f2413214 | |
Emiliano Vavassori | 198c00dc54 | |
Emiliano Vavassori | 5a6c50a870 | |
Emiliano Vavassori | df515691a3 | |
Emiliano Vavassori | 49d16a83ee | |
Emiliano Vavassori | 664c93e509 | |
Emiliano Vavassori | 16804ba296 | |
Emiliano Vavassori | 034e483b96 | |
Emiliano Vavassori | efa80ce5a9 | |
Emiliano Vavassori | a001256663 | |
Emiliano Vavassori | 98e1f7fad8 | |
Emiliano Vavassori | c612859fdf | |
Emiliano Vavassori | b998068d63 | |
Emiliano Vavassori | 55d222132b | |
Emiliano Vavassori | dc1b532c5b | |
Emiliano Vavassori | 1e7b5dcd47 | |
Emiliano Vavassori | 91946e3181 | |
Emiliano Vavassori | 5548a1ff5a | |
Emiliano Vavassori | 9ced7b7052 | |
Emiliano Vavassori | d5ab68fb01 | |
Emiliano Vavassori | 09f7df6000 | |
Emiliano Vavassori | 3908fffd4d | |
Emiliano Vavassori | 75613cc0c6 | |
Emiliano Vavassori | 153741495e | |
Emiliano Vavassori | b721cad45b | |
Emiliano Vavassori | 47ac841a07 | |
Emiliano Vavassori | f8a092d081 | |
Emiliano Vavassori | 26b66684a0 | |
Emiliano Vavassori | 1ec657956a | |
Emiliano Vavassori | bc0f279ffa | |
Emiliano Vavassori | 059b60e80c | |
Emiliano Vavassori | 08532e58d7 | |
Emiliano Vavassori | c5bcc66166 | |
Emiliano Vavassori | 9060457ef4 | |
Emiliano Vavassori | d9076a01d8 | |
Emiliano Vavassori | 7d30b39d28 | |
Emiliano Vavassori | 4992e4032a | |
Emiliano Vavassori | 6c6425ac9b | |
Emiliano Vavassori | 42fcbef87d | |
Emiliano Vavassori | d7389bd1c9 | |
Emiliano Vavassori | 7312721165 | |
Emiliano Vavassori | 8b0959a0cf | |
Emiliano Vavassori | 692233c6f6 | |
Emiliano Vavassori | 19983d13bf | |
Emiliano Vavassori | 133951e4c1 | |
Emiliano Vavassori | 304a75b327 | |
Emiliano Vavassori | 5b843819a6 | |
Emiliano Vavassori | 04115d8b4a | |
Emiliano Vavassori | 19173eff4d | |
Emiliano Vavassori | ee2a6b960a | |
Emiliano Vavassori | 4d47dfe31b | |
Emiliano Vavassori | 54ec8d4bc0 | |
Emiliano Vavassori | 63f34fbb60 | |
Emiliano Vavassori | 714ec47f9c | |
Emiliano Vavassori | 83b78a5c6f | |
Emiliano Vavassori | 78f0f438a3 | |
Emiliano Vavassori | 1e9e6f61f6 | |
Emiliano Vavassori | c7e474c80e | |
Emiliano Vavassori | 1065bfab05 | |
Emiliano Vavassori | b8fd550c4c | |
Emiliano Vavassori | 52771cba44 | |
Emiliano Vavassori | c587b66ee0 | |
Emiliano Vavassori | 79ac46369b | |
Emiliano Vavassori | 7e73aaede4 |
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -10,11 +10,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
# please see the online documentation at vagrantup.com.
|
||||
|
||||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = "syntaxerrormmm/nethserver"
|
||||
config.vm.define "NethServer" do |nethserver|
|
||||
|
||||
# Defining a base vm name:
|
||||
myname = "NethServer"
|
||||
|
||||
config.vm.box = "syntaxerrormmm/nethserver-6.9"
|
||||
config.vm.box_url = "https://vagrant.libreschool.org/nethserver-6.9"
|
||||
config.vm.define myname do |nethserver|
|
||||
end
|
||||
config.vm.provider :virtualbox do |vb|
|
||||
vb.name = "NethServer"
|
||||
vb.name = myname
|
||||
end
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
|
@ -30,7 +35,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||
config.vm.network "private_network", ip: "192.168.1.1", auto_config: false
|
||||
config.vm.network "private_network", ip: "172.16.254.1", auto_config: false
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
|
@ -126,7 +131,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
#
|
||||
# chef.validation_client_name = "ORGNAME-validator"
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
ansible.inventory_path = "vagrant/hosts"
|
||||
ansible.playbook = "vagrant/vagrant.yml"
|
||||
# Using default dynamic inventory
|
||||
ansible.playbook = "provision.yml"
|
||||
ansible.groups = {
|
||||
"vagrant" => [ myname ]
|
||||
}
|
||||
ansible.compatibility_mode = "2.0"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[defaults]
|
||||
host_key_checking=False
|
||||
inventory=hosts
|
||||
roles_path=roles
|
||||
pipelining=True
|
||||
|
|
40
domain.yml
40
domain.yml
|
@ -1,25 +1,31 @@
|
|||
---
|
||||
# Configurazione dominio
|
||||
ntpserver: pdc.mastri.edu
|
||||
ntpserver: pdc.topolin.ia
|
||||
server: pdc
|
||||
serverip: 192.168.1.1
|
||||
serverip: 172.16.254.1
|
||||
servernetmask: 255.255.255.0
|
||||
servernet: 192.168.1.0
|
||||
servergw: 192.168.1.1
|
||||
serverfqdn: pdc.mastri.edu
|
||||
domainshort: MASTRI
|
||||
domainfull: mastri.edu
|
||||
dhcprange_start: 192.168.1.10
|
||||
dhcprange_end: 192.168.1.50
|
||||
servernet: 172.16.254.0
|
||||
servergw: 172.16.254.1
|
||||
serverfqdn: pdc.topolin.ia
|
||||
domainshort: TOPOLIN
|
||||
domainfull: topolin.ia
|
||||
dhcprange_start: 172.16.254.10
|
||||
dhcprange_end: 172.16.254.50
|
||||
extdnsserver1: 208.67.222.222
|
||||
extdnsserver2: 208.67.220.220
|
||||
org_email: info@bglug.it
|
||||
org_company: Istituto Comprensivo 'Mastri Caravaggini'
|
||||
org_countrycode: IT
|
||||
org_company: Accademia di SuperPippo
|
||||
org_countrycode: IA
|
||||
org_department: "Laboratorio 1"
|
||||
org_city: Caravaggio
|
||||
org_phone: "+39 0363 50598"
|
||||
org_street: "Via Zenale e Butinone, 20"
|
||||
mirror_mode: nfs
|
||||
mirror_nfs_share: 192.168.255.1:/var/spool/apt-mirror/mirror
|
||||
mirrorpath: pdc.mastri.edu/ks/mirror/
|
||||
org_city: Topolinia
|
||||
org_phone: "313 113 176-167"
|
||||
org_street: "Piazza la bomba e scappa"
|
||||
edu_package: secondary
|
||||
mirror_mode: remote
|
||||
#mirror_nfs_share: 192.168.255.1:/var/spool/apt-mirror/mirror
|
||||
mirror_host: it.archive.ubuntu.com
|
||||
#mirror_path: /ubuntu
|
||||
#mirror_security_host: security.ubuntu.com
|
||||
#mirror_security_path: /ubuntu
|
||||
client_gitbranch: master
|
||||
#client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
|
||||
|
|
2
hosts
2
hosts
|
@ -2,4 +2,4 @@
|
|||
host_key_checking=false
|
||||
|
||||
[server]
|
||||
192.168.1.1 ansible_ssh_user=amgmt
|
||||
172.16.254.1 ansible_ssh_user=amgmt
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
# Default password for project #
|
||||
|
||||
* NS Box root user: `vagrant`
|
||||
* NS Box vagrant user: `vagrant`
|
||||
* Vault Password: `v4ul+Password!`
|
||||
* amgmt user (server): `DoN0t4g3t!`
|
||||
* bglug user (client): `s4lamanDr@`
|
||||
* admin user (domain): `R0busTdom41nPa55wd!`
|
||||
|
||||
# How to change passwords for production deployments #
|
||||
|
||||
## *root* and *vagrant* users ##
|
||||
|
||||
These will not be required, since you will not have a virtual machine to
|
||||
manage via *Vagrant*.
|
||||
|
||||
## Vault password ##
|
||||
|
||||
Clone [`client-pull-installation`][2] then, in the working copy, launch following commands:
|
||||
|
||||
$ ansible-vault rekey domainpwd.vault
|
||||
|
||||
`ansible-vault` will ask one time the old password and two times the new one.
|
||||
|
||||
## *amgmt* user (server-side) ##
|
||||
|
||||
Clone [`server-config`][1] then, in the working copy, generate a new password hash with the follwing command:
|
||||
|
||||
$ mkpasswd -m sha-512
|
||||
|
||||
The command would ask for the password to be hashed. Please copy the result string.
|
||||
|
||||
Open up the file `roles/init/tasks/mgmtuser.yml`, find out `password:` and then replace previous hash with the one you have just created.
|
||||
|
||||
## *bglug* user (client side but preseeded) ##
|
||||
|
||||
The definition of password for *bglug* is inside `*.seed` files, inside [`server-config`][1]. Create a new password hash with:
|
||||
|
||||
$ mkpasswd -m sha-512
|
||||
|
||||
Copy the hash in your clipboard; clone the repository, then in the working directory:
|
||||
|
||||
$ find . -iname \*.seed -exec $EDITOR {} \;
|
||||
|
||||
Within each `*.seed` file, search for the string `user-password-crypted` string and change following hash.
|
||||
|
||||
## *admin* user (domain valid) ##
|
||||
|
||||
Password must be specified within NethServer interface for the *admin* user and must be absolutely equal to the one contained inside vault file.
|
||||
|
||||
Clone [`client-pull-installation`][2], create new branch and modify the password inside `domainpwd.vault`:
|
||||
|
||||
$ ansible-vault edit domainpwd.vault
|
||||
|
||||
The system would ask for the vault password. Change the plain text password with your editor.
|
||||
|
||||
[1]: https://github.com/bglug-it/server-config
|
||||
[2]: https://github.com/bglug-it/client-pull-installation
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
|
||||
- hosts: server
|
||||
roles:
|
||||
- ovpn-client
|
|
@ -2,4 +2,4 @@
|
|||
# Vagrant provisioning playbook
|
||||
- hosts: vagrant
|
||||
roles:
|
||||
- rename-nic
|
||||
- rename-nic
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Creazione directory per ansible-pull
|
||||
file: path=/var/lib/nethserver/ibay/ks/ansible-pull state=directory
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Template
|
||||
template: src={{ item }} dest=/var/lib/nethserver/ibay/ks/ansible-pull/{{ item }}
|
||||
|
@ -10,8 +10,8 @@
|
|||
- ansible-pull.sh
|
||||
- getvaultpass.py
|
||||
- crontab
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Logrotate
|
||||
copy: src=logrotate dest=/var/lib/nethserver/ibay/ks/ansible-pull/logrotate
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
|
|
@ -16,12 +16,12 @@ echo "$(date --rfc-3339=seconds) Loading and running init-ansible.sh"
|
|||
url=git://{{ ansible_local.domain.serverfqdn }}/client-pull-installation.git
|
||||
repo=/var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
logfile=/var/lib/ansible-pull.log
|
||||
branch=master
|
||||
branch={{ ansible_local.domain.client_gitbranch }}
|
||||
playbook=local.yml
|
||||
|
||||
echo "$(date --rfc-3339=seconds) Getting vault password"
|
||||
vaultpassfile=$(/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/getvaultpass.py | /usr/bin/python)
|
||||
|
||||
echo "$(date --rfc-3339=seconds) Running ansible-pull"
|
||||
/usr/bin/ansible-pull --accept-host-key -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
||||
/usr/bin/ansible-pull --accept-host-key -i localhost -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
||||
rm -f "${vaultpassfile}"
|
||||
|
|
|
@ -1,15 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Fixing base variables.
|
||||
basedir=/var/lib/{{ ansible_local.domain.domainfull }}
|
||||
url=git://{{ ansible_local.domain.serverfqdn }}/client-pull-installation.git
|
||||
branch={{ ansible_local.domain.client_gitbranch }}
|
||||
|
||||
# Creo directory dipendenti
|
||||
echo "$(date --rfc-3339=seconds) Installing config directory"
|
||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/bin
|
||||
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
||||
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
||||
/usr/bin/install -d -o root -g users ${basedir}/bin
|
||||
|
||||
# Workaround issue #23 - ansible-pull won't pull out of remote the first time.
|
||||
if [[ ! -f ${basedir}/config/local.yml ]]; then
|
||||
/usr/bin/git clone -b ${branch} ${url} ${basedir}/config
|
||||
fi
|
||||
|
||||
# Installo ansible-pull.sh
|
||||
echo "$(date --rfc-3339=seconds) Creating ansible-pull.sh."
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
||||
chmod a+x /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O ${basedir}/bin/ansible-pull.sh
|
||||
chmod a+x ${basedir}/bin/ansible-pull.sh
|
||||
|
||||
# Fixing permissions on the main directory
|
||||
/bin/chown -R root:users ${basedir}
|
||||
|
||||
# Installo il cronjob per ansible-pull
|
||||
echo "$(date --rfc-3339=seconds) Creating crontab"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: pxe, tags: [ 'client-install' ] }
|
||||
- { role: ubuntu-mirror, tags: [ 'client-install' ] }
|
||||
- { role: preseed, tags: [ 'client-install' ] }
|
||||
- { role: ansible-pull, tags: [ 'client-install' ] }
|
||||
- { role: ubuntu-mirror, tags: [ 'client-install' ] }
|
||||
- { role: doraemon, tags: [ 'client-install' ] }
|
||||
- { role: npm, tags: [ 'client-install' ] }
|
||||
- { role: git-daemon, tags: [ 'client-install' ] }
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- rpmdevtools
|
||||
- yum-utils
|
||||
- rpmlint
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Aggiungo utente per compilazione pacchetti RPM
|
||||
user:
|
||||
|
@ -14,16 +14,16 @@
|
|||
password: $6$rounds=100000$neTGJ5N7Nu5ogCTX$VmVgS9HRZcdczjiNNdQcZzFVQI/3AFwu6MNFOKxGhBRY4VcBOo6GTxhXr0K/jYVFTygjHWsr.teM6RmBzSnz.0
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Copia della chiave pubblica
|
||||
authorized_key:
|
||||
user: makepkg
|
||||
key: "{{ lookup('file', '/Users/syntaxerrormmm/.ssh/id_rsa.pub') }}"
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Creazione directory per il build di RPM
|
||||
shell: rpmdev-setuptree
|
||||
sudo: yes
|
||||
sudo_user: makepkg
|
||||
become: yes
|
||||
become_user: makepkg
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
doraemon_pkg: doraemon
|
||||
doraemon_version: 1.2.0-1
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
- name: Installazione doraemon
|
||||
yum:
|
||||
pkg: doraemon
|
||||
pkg: "{{ doraemon_pkg }}"
|
||||
state: latest
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Verifico avvio di doraemon
|
||||
service: name=doraemon state=restarted
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
|
||||
client_gitbranch: master
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
- name: Installo git-daemon
|
||||
yum: pkg=git-daemon state=present
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Creazione gruppo git
|
||||
group:
|
||||
name: git
|
||||
system: yes
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Creazione utente git-daemon
|
||||
user:
|
||||
|
@ -19,46 +19,46 @@
|
|||
group: git
|
||||
home: /var/lib/git-daemon
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Creo directory repositories
|
||||
file:
|
||||
path: /var/lib/git-daemon/repositories
|
||||
state: directory
|
||||
sudo: yes
|
||||
sudo_user: git-daemon
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
|
||||
- name: Verifica presenza repo
|
||||
shell: test -d /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
register: chk_clientpullinstall_repo
|
||||
changed_when: chk_clientpullinstall_repo.rc != 0
|
||||
ignore_errors: yes
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags:
|
||||
- git-daemon-update
|
||||
|
||||
- name: Aggiorno il repo se già esistente
|
||||
shell: pushd /var/lib/git-daemon/repositories/client-pull-installation.git; git fetch -p origin; popd
|
||||
sudo: yes
|
||||
sudo_user: git-daemon
|
||||
when: chk_clientpullinstall_repo|success
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
when: chk_clientpullinstall_repo is succeeded
|
||||
tags:
|
||||
- git-daemon-update
|
||||
|
||||
# E' in forma di shell perché non c'è modo di passare ad ansible
|
||||
# il parametro --mirror
|
||||
- name: Clono il repository client-pull-installation
|
||||
shell: git clone --mirror https://github.com/bglug-it/client-pull-installation.git /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
sudo: yes
|
||||
sudo_user: git-daemon
|
||||
when: chk_clientpullinstall_repo|changed
|
||||
shell: git clone --mirror {{ client_gitrepo }} /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
when: chk_clientpullinstall_repo is changed
|
||||
|
||||
- name: Rendo il repository esportabile
|
||||
file:
|
||||
path: /var/lib/git-daemon/repositories/client-pull-installation.git/git-daemon-export-ok
|
||||
state: touch
|
||||
sudo: yes
|
||||
sudo_user: git-daemon
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
tags:
|
||||
- git-daemon-update
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Installo l'init
|
||||
copy:
|
||||
|
@ -78,31 +78,31 @@
|
|||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Configuro l'avvio di git-daemon
|
||||
shell: /sbin/chkconfig --add git-daemon
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Verifica aggiunta servizio
|
||||
shell: /sbin/e-smith/db configuration show git-daemon
|
||||
sudo: yes
|
||||
become: yes
|
||||
register: chk_gitdaemon_srv
|
||||
changed_when: chk_gitdaemon_srv.rc != 0
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Aggiungo servizio a gestione NethServer
|
||||
shell: /sbin/e-smith/db configuration set git-daemon service status enabled TCPPort 9418 access private
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
||||
- name: Creazione directory defaults per NethServer
|
||||
file:
|
||||
path: /etc/e-smith/db/configuration/defaults/git-daemon
|
||||
recurse: yes
|
||||
state: directory
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
||||
- name: Creazione tipo default per NethServer
|
||||
lineinfile:
|
||||
|
@ -111,8 +111,8 @@
|
|||
line: "service"
|
||||
create: yes
|
||||
state: present
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
||||
- name: Creazione stato default per NethServer
|
||||
lineinfile:
|
||||
|
@ -121,20 +121,20 @@
|
|||
line: "enabled"
|
||||
create: yes
|
||||
state: present
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
||||
- name: Aggiunta servizio
|
||||
shell: /sbin/e-smith/signal-event runlevel-adjust
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
||||
- name: Aggiunta servizio di rete e cambio firewall
|
||||
shell: /sbin/e-smith/signal-event firewall-adjust
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
||||
- name: Avvio servizio
|
||||
shell: service git-daemon start
|
||||
sudo: yes
|
||||
when: chk_gitdaemon_srv|changed
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
|
||||
- name: Overriding default gitrepo if defined in domain.yml
|
||||
set_fact: client_gitrepo="{{ ansible_local.domain.client_gitrepo }}"
|
||||
when: "ansible_local.domain.client_gitrepo is defined"
|
||||
|
||||
- name: Overriding default gitbranch if defined in domain.yml
|
||||
set_fact: client_gitbranch="{{ ansible_local.domain.client_gitbranch }}"
|
||||
when: "ansible_local.domain.client_gitbranch is defined"
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
|
||||
- include: initvars.yml
|
||||
tags: git-daemon
|
||||
|
||||
- include: git-daemon.yml
|
||||
tags: git-daemon
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
|
||||
ansible_ssh_user: root
|
||||
admin_sshkey: /Users/syntaxerrormmm/.ssh/id_rsa.pub
|
||||
admin_sshkey: "{{ lookup('env', 'HOME') + '/.ssh/id_rsa.pub' }}"
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
# Copia le configurazioni per il dominio in locale sul server.
|
||||
- name: Copia le configurazioni di dominio.
|
||||
copy: src=../../../domain.yml dest=/etc/domain.yml force=yes
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Creo la cartella per le configurazioni di Ansible
|
||||
file: path=/etc/ansible/facts.d state=directory owner=root mode=0755
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Installo PyYAML, necessario per i facts
|
||||
yum:
|
||||
name: PyYAML
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Utilizzo un piccolo wrapper per passare come fatti informazioni di dominio
|
||||
copy: src=domain.fact dest=/etc/ansible/facts.d/domain.fact mode=0755 owner=root
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Rileggo i fatti per essere sicuri che vengano utilizzati
|
||||
setup: filter=ansible_local
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
- include: selinux-binding.yml
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- include: yum-utils.yml
|
||||
|
||||
- include: mgmtuser.yml
|
||||
|
||||
- include: domaininfo.yml
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
---
|
||||
- name: Creazione account di gestione Ansible
|
||||
user: name=amgmt comment="Ansible Management User" group=wheel state=present password=$6$rounds=100000$XvHuMoXtpCksx379$nhlfUn38.oBB7JrDrtwfUisw8T0Bg5InzFq1fw31mcEmGZ2AYFkFK2zC2g04lSfw.kpdSgqH3Dl5q9r1fY6.k.
|
||||
user:
|
||||
name: amgmt
|
||||
comment: "Ansible Management User"
|
||||
group: wheel
|
||||
state: present
|
||||
password: $6$mVKMBMbAxeql$eqSe8tu2qKjtwmpiFy07b6nv2g4F80N.U9EzOmQTrNZwKZ61n6NLrSEQHQo1FOlQghOiB8as6Z35oTUUKN8y2.
|
||||
|
||||
- name: Concessione diritti all'utente di gestione Ansible
|
||||
template: src=sudoers.d dest=/etc/sudoers.d/amgmt mode="u=r,g=r" validate="visudo -cf %s"
|
||||
template:
|
||||
src: sudoers.d
|
||||
dest: /etc/sudoers.d/amgmt
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0440
|
||||
validate: "/usr/sbin/visudo -cf %s"
|
||||
|
||||
- name: Installazione chiave privata PC locale
|
||||
authorized_key: user=amgmt key="{{ lookup('file', admin_sshkey) }}" state=present
|
||||
authorized_key:
|
||||
user: amgmt
|
||||
key: "{{ lookup('file', admin_sshkey) }}"
|
||||
state: present
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Installing yum-utils to enable repositories
|
||||
yum:
|
||||
name: yum-utils
|
||||
state: present
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
extnic: wan0
|
||||
intnic: lan0
|
||||
force_regen_ca: false
|
||||
force_ibay_shared: false
|
||||
development: false
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
---
|
||||
# Base configurations to be implemented anyways.
|
||||
|
||||
# installing italian interface translation
|
||||
|
||||
- name: Making available also Italian NethGUI
|
||||
yum:
|
||||
pkg: nethserver-lang-it
|
||||
state: present
|
||||
tags: nethgui
|
||||
|
||||
# Trusted networks: LAN
|
||||
|
||||
- name: Check for LAN to be added as Trusted Network
|
||||
shell: /sbin/e-smith/db networks printprop {{ ansible_local.domain.servernet }} Description
|
||||
register: check_trusted
|
||||
changed_when: '"Description=Local LAN" not in check_trusted.stdout'
|
||||
ignore_errors: yes
|
||||
tags: trustednet
|
||||
|
||||
- name: Configuring trusted networks
|
||||
shell: /sbin/e-smith/db networks set {{ ansible_local.domain.servernet }} network Description "Local LAN" Mask {{ ansible_local.domain.servernetmask }}
|
||||
when: check_trusted is changed
|
||||
tags: trustednet
|
||||
|
||||
- name: Activating trusted network
|
||||
shell: /sbin/e-smith/signal-event trusted-networks-modify
|
||||
when: check_trusted is changed
|
||||
tags: trustednet
|
||||
|
||||
# Preconfiguring DNS anyways
|
||||
|
||||
- name: Checking DNS configuration
|
||||
shell: /sbin/e-smith/db configuration printprop dns NameServers
|
||||
register: chk_dns
|
||||
changed_when: "'NameServers={{ ansible_local.domain.extdnsserver1 }}' not in chk_dns.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Configuring DNS resolution
|
||||
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
||||
when: chk_dns is changed
|
||||
tags: dns-preset
|
||||
|
||||
- name: Activating correct DNS resolution
|
||||
shell: "/sbin/e-smith/signal-event nethserver-base-update"
|
||||
when: chk_dns is changed
|
||||
|
||||
# Hostname and domainname
|
||||
|
||||
- name: Configuring hostname
|
||||
shell: /sbin/e-smith/db configuration set SystemName {{ ansible_local.domain.server }}
|
||||
register: chg_hostname
|
||||
when: "'{{ ansible_hostname }}' != '{{ ansible_local.domain.server }}'"
|
||||
tags: hostname
|
||||
|
||||
- name: Configuring domain name
|
||||
shell: /sbin/e-smith/db configuration set DomainName {{ ansible_local.domain.domainfull }}
|
||||
register: chg_domainname
|
||||
when: "'{{ ansible_domain }}' != '{{ ansible_local.domain.domainfull }}'"
|
||||
tags: domainname
|
||||
|
||||
- name: Activating hostname/domainname changes
|
||||
shell: /sbin/e-smith/signal-event hostname-modify
|
||||
when: chg_hostname is changed or chg_domainname is changed
|
||||
tags:
|
||||
- hostname
|
||||
- domainname
|
||||
|
||||
# Base certificate
|
||||
|
||||
- name: Checking CA configuration
|
||||
shell: /sbin/e-smith/db configuration printprop pki CommonName
|
||||
ignore_errors: true
|
||||
register: chk_crt
|
||||
changed_when: "'CommonName={{ ansible_local.domain.serverfqdn }}' not in chk_crt.stdout"
|
||||
tags: regen-ca
|
||||
|
||||
- name: Configuring CA
|
||||
shell: /sbin/e-smith/db configuration setprop pki CertificateDuration 3650 CommonName {{ ansible_local.domain.serverfqdn }} CountryCode {{ ansible_local.domain.org_countrycode }} EmailAddress {{ ansible_local.domain.org_email }} Locality "{{ ansible_local.domain.org_city }}" Organization "{{ ansible_local.domain.org_company }}"
|
||||
tags: regen-ca
|
||||
when: chk_crt is changed or force_regen_ca|bool
|
||||
|
||||
- name: Activating CA and regenerate
|
||||
shell: /sbin/e-smith/signal-event certificate-update
|
||||
when: chk_crt is changed or force_regen_ca|bool
|
||||
tags: regen-ca
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
# Installing and configuring DHCP and DNS
|
||||
|
||||
- name: Installing DHCP and DNS related NethServer packages.
|
||||
yum:
|
||||
name: nethserver-dnsmasq
|
||||
state: present
|
||||
|
||||
# DHCP
|
||||
|
||||
- name: Checking DHCP configuration
|
||||
shell: /sbin/e-smith/db dhcp getprop {{ intnic }} DhcpRangeStart
|
||||
ignore_errors: true
|
||||
register: chk_dhcp
|
||||
|
||||
- name: Configuring DHCP
|
||||
shell: /sbin/e-smith/db dhcp set {{ intnic }} range DhcpRangeStart {{ ansible_local.domain.dhcprange_start }} DhcpRangeEnd {{ ansible_local.domain.dhcprange_end }} status enabled
|
||||
when: chk_dhcp is failed
|
||||
|
||||
- name: Activating DHCP
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
when: chk_dhcp is failed
|
||||
|
||||
# DNS
|
||||
# Already preconfigured before (roles/nethcfg/tasks/base.yml)
|
||||
# reforcing the resolver addresses to the ones configured
|
||||
|
||||
- name: Checking DNS configuration
|
||||
shell: /sbin/e-smith/db configuration printprop dns NameServers
|
||||
register: chk_dns
|
||||
changed_when: "'NameServers={{ ansible_local.domain.extdnsserver1 }}' not in chk_dns.stdout"
|
||||
tags: force-resolvers
|
||||
|
||||
- name: Configuring DNS resolution
|
||||
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
||||
when: chk_dns is changed
|
||||
tags: force-resolvers
|
||||
|
||||
- name: Activating correct DNS resolution
|
||||
shell: "/sbin/e-smith/signal-event nethserver-{{ item }}-update"
|
||||
with_items:
|
||||
- base
|
||||
- dnsmasq
|
||||
when: chk_dns is changed
|
||||
tags: force-resolvers
|
||||
|
||||
# Avahi
|
||||
|
||||
- name: Installing avahi-daemon
|
||||
yum:
|
||||
name: nethserver-avahi
|
||||
state: present
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
# Organization
|
||||
|
||||
- name: Installing required packages
|
||||
yum:
|
||||
pkg: nethserver-directory
|
||||
state: present
|
||||
|
||||
- name: Check organization configuration
|
||||
shell: /sbin/e-smith/db configuration printprop OrganizationContact City
|
||||
register: check_org
|
||||
changed_when: "'City={{ ansible_local.domain.org_city }}' not in check_org.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
# Password policy
|
||||
|
||||
- name: Check for password policy
|
||||
shell: /sbin/e-smith/db configuration printprop passwordstrength Users
|
||||
register: chk_passstr
|
||||
changed_when: "'Users=none' not in chk_passstr.stdout"
|
||||
ignore_errors: true
|
||||
tags: password-policy
|
||||
|
||||
- name: Configuring password policy
|
||||
shell: /sbin/e-smith/db configuration setprop passwordstrength PassExpires no Users none Admin strong MaxPassAge 180 MinPassAge 0 PassExpires no PassWarning 7
|
||||
when: chk_passstr is changed
|
||||
tags: password-policy
|
||||
|
||||
- name: Activating password policy
|
||||
shell: /sbin/e-smith/signal-event password-policy-update
|
||||
when: chk_passstr is changed
|
||||
tags: password-policy
|
||||
|
||||
# Organization configuration
|
||||
|
||||
- name: Configuring organization
|
||||
shell: /sbin/e-smith/db configuration setprop OrganizationContact City "{{ ansible_local.domain.org_city }}" Company "{{ ansible_local.domain.org_company }}" CountryCode {{ ansible_local.domain.org_countrycode }} Department "{{ ansible_local.domain.org_department }}" PhoneNumber "{{ ansible_local.domain.org_phone }}" Street "{{ ansible_local.domain.org_street }}"
|
||||
when: check_org is changed
|
||||
|
||||
- name: Activating organization configuration
|
||||
shell: /sbin/e-smith/signal-event organization-save
|
||||
when: check_org is changed
|
|
@ -1,49 +1,47 @@
|
|||
---
|
||||
- name: Verifico la presenza del gruppo Domain Users
|
||||
# Domain groups
|
||||
|
||||
# Domain Users
|
||||
|
||||
- name: domusers - Checking for group
|
||||
shell: /sbin/e-smith/db accounts show domusers
|
||||
register: check_domusers
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
|
||||
- name: Creazione gruppo Domain Users
|
||||
- name: domusers - Creating new group
|
||||
shell: /sbin/e-smith/db accounts set domusers group Description "Domain Users" Members admin Removable no
|
||||
sudo: yes
|
||||
when: check_domusers|failed
|
||||
when: check_domusers is failed
|
||||
|
||||
- name: Configurazione nuovo gruppo Domain Users
|
||||
- name: domusers - Activating group
|
||||
shell: /sbin/e-smith/signal-event group-create domusers
|
||||
sudo: yes
|
||||
when: check_domusers|failed
|
||||
when: check_domusers is failed
|
||||
|
||||
- name: Verifico la presenza del gruppo Domain Operators
|
||||
# Domain Operators
|
||||
|
||||
- name: domopers - Checking for group
|
||||
shell: /sbin/e-smith/db accounts show domopers
|
||||
register: check_domopers
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
|
||||
- name: Creazione gruppo Domain Operators
|
||||
- name: domopers - Creating new group
|
||||
shell: /sbin/e-smith/db accounts set domopers group Description "Domain Operators" Removable no
|
||||
sudo: yes
|
||||
when: check_domopers|failed
|
||||
when: check_domopers is failed
|
||||
|
||||
- name: Configurazione nuovo gruppo Domain Operators
|
||||
- name: domopers - Activating group
|
||||
shell: /sbin/e-smith/signal-event group-create domopers
|
||||
sudo: yes
|
||||
when: check_domopers|failed
|
||||
when: check_domopers is failed
|
||||
|
||||
- name: Verifico la presenza del gruppo Docenti
|
||||
# Docenti
|
||||
|
||||
- name: docenti - Checking for group
|
||||
shell: /sbin/e-smith/db accounts show docenti
|
||||
register: check_docenti
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
|
||||
- name: Creazione gruppo Docenti
|
||||
- name: docenti - Creating new group
|
||||
shell: /sbin/e-smith/db accounts set docenti group Description "Docenti" Removable no
|
||||
sudo: yes
|
||||
when: check_docenti|failed
|
||||
when: check_docenti is failed
|
||||
|
||||
- name: Configurazione nuovo gruppo Docenti
|
||||
- name: docenti - Activating group
|
||||
shell: /sbin/e-smith/signal-event group-create docenti
|
||||
sudo: yes
|
||||
when: check_docenti|failed
|
||||
|
||||
when: check_docenti is failed
|
||||
|
|
|
@ -1,19 +1,57 @@
|
|||
---
|
||||
# Configurazione principale di NethServer.
|
||||
# Configuring NethServer as requested
|
||||
|
||||
# Installo pacchetti addizionali
|
||||
- include: neth_pkgs.yml
|
||||
# Network interfaces
|
||||
- include: network.yml
|
||||
become: yes
|
||||
tags:
|
||||
- nethpkg
|
||||
- network
|
||||
|
||||
- include: reconfig_nic.yml
|
||||
# Configuring base parameters
|
||||
- include: base.yml
|
||||
become: yes
|
||||
tags:
|
||||
- nethnic
|
||||
- base
|
||||
|
||||
- include: reconfig_srv.yml
|
||||
- include: ntp.yml
|
||||
become: yes
|
||||
tags:
|
||||
- nethcfg
|
||||
- ntp
|
||||
|
||||
# Directory and organization
|
||||
- include: directory.yml
|
||||
become: yes
|
||||
tags:
|
||||
- directory
|
||||
|
||||
# DHCP and DNS
|
||||
- include: dhcpdns.yml
|
||||
become: yes
|
||||
tags:
|
||||
- dhcpdns
|
||||
|
||||
# Other small services
|
||||
- include: otherservices.yml
|
||||
become: yes
|
||||
tags:
|
||||
- otherservices
|
||||
|
||||
# Proxy and web filter
|
||||
- include: proxy.yml
|
||||
become: yes
|
||||
tags:
|
||||
- proxy
|
||||
- webfilter
|
||||
|
||||
# SAMBA and ibays
|
||||
- include: samba.yml
|
||||
become: yes
|
||||
tags:
|
||||
- samba
|
||||
- ibay
|
||||
|
||||
# Domain groups
|
||||
- include: domain_groups.yml
|
||||
become: yes
|
||||
tags:
|
||||
- domaingroups
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
|
||||
- name: Installazione pacchetti neth
|
||||
yum: name="{{ item }}" state=present
|
||||
sudo: yes
|
||||
with_items: neth_pkgs
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# Reconfiguring network interfaces
|
||||
|
||||
- name: Configuring internal NIC
|
||||
shell: /sbin/e-smith/db networks setprop {{ intnic }} role green ipaddr {{ ansible_local.domain.serverip }} netmask {{ ansible_local.domain.servernetmask }}
|
||||
|
||||
- name: Activating changes to NICs
|
||||
shell: /sbin/e-smith/signal-event interface-update
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
# Network time protocol
|
||||
|
||||
- name: Installing NTP related packages.
|
||||
yum:
|
||||
name: nethserver-ntp
|
||||
state: present
|
||||
|
||||
- name: Checking for NTP Configuration
|
||||
shell: /sbin/e-smith/db configuration printprop ntpd NTPServer
|
||||
become: yes
|
||||
register: chk_ntp
|
||||
changed_when: "'NTPServer=ntp1.inrim.it' not in chk_ntp.stdout"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Configuring NTP
|
||||
shell: /sbin/e-smith/db configuration setprop ntpd NTPServer ntp1.inrim.it status enabled
|
||||
become: yes
|
||||
when: chk_ntp is changed
|
||||
|
||||
- name: Activating NTP
|
||||
shell: /sbin/e-smith/signal-event nethserver-ntp-update
|
||||
become: yes
|
||||
when: chk_ntp is changed
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
# Installation and configuration of small services
|
||||
|
||||
- name: Installing other small services
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- nethserver-cups
|
||||
- nethserver-collectd
|
||||
- nethserver-collectd-web
|
||||
- nethserver-firewall-base
|
||||
- nethserver-firewall-base-ui
|
||||
- nethserver-backup-config
|
||||
- nethserver-backup-data
|
|
@ -0,0 +1,79 @@
|
|||
---
|
||||
# Proxy and webfiltering configurations
|
||||
|
||||
- name: Installing proxy-related packages
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- nethserver-squid
|
||||
- nethserver-squidclamav
|
||||
- nethserver-squidguard
|
||||
|
||||
# Squid
|
||||
|
||||
- name: Checking squid configuration
|
||||
shell: /sbin/e-smith/db configuration printprop squid DiskCacheSize
|
||||
ignore_errors: yes
|
||||
register: chk_squid
|
||||
changed_when: "'DiskCacheSize=2000' not in chk_squid.stdout"
|
||||
|
||||
- name: Configuring Squid
|
||||
shell: /sbin/e-smith/db configuration setprop squid BlueMode transparent GreenMode transparent PortBlock disabled status enabled DiskCache enabled DiskCacheSize 2000
|
||||
when: chk_squid is changed
|
||||
|
||||
- name: Activating Squid configuration
|
||||
shell: /sbin/e-smith/signal-event nethserver-squid-update
|
||||
when: chk_squid is changed
|
||||
|
||||
# Squid-clamav
|
||||
|
||||
- name: Checking squidclamav configuration
|
||||
shell: /sbin/e-smith/db configuration printprop squidclamav status
|
||||
ignore_errors: true
|
||||
register: chk_squidclamav
|
||||
changed_when: "'status=enabled' not in chk_squidclamav.stdout"
|
||||
|
||||
- name: Configuring squidclamav
|
||||
shell: /sbin/e-smith/db configuration setprop squidclamav status enabled
|
||||
when: chk_squidclamav is changed
|
||||
|
||||
- name: Activating squidclamav
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidclamav-update
|
||||
when: chk_squidclamav is changed
|
||||
|
||||
# SquidGuard
|
||||
|
||||
- name: Verifying squidguard configuration
|
||||
shell: /sbin/e-smith/db configuration printprop squidguard status
|
||||
register: check_squidguard
|
||||
ignore_errors: true
|
||||
changed_when: '"status=enabled" not in check_squidguard.stdout'
|
||||
|
||||
- name: Configuring squidguard
|
||||
shell: /sbin/e-smith/db configuration setprop squidguard Expressions enabled Lists shalla status enabled
|
||||
when: check_squidguard is changed
|
||||
|
||||
- name: Activating squidguard configuration
|
||||
shell: "/sbin/e-smith/signal-event nethserver-squidguard-{{ item }}"
|
||||
with_items:
|
||||
- save
|
||||
- update
|
||||
- downloadlists
|
||||
when: check_squidguard is changed
|
||||
|
||||
# Content filtering settings
|
||||
|
||||
- name: Verifying content filtering
|
||||
shell: /sbin/e-smith/db contentfilter printprop default Categories
|
||||
register: check_cf
|
||||
changed_when: "'sex' not in check_cf.stdout"
|
||||
|
||||
- name: Configuring content filtering
|
||||
shell: /sbin/e-smith/db contentfilter setprop default Categories aggressive,alcohol,weapons,games-online,gamble,dating,webradio,webtv,sex,porn,spyware,violence,anonvpn,warez
|
||||
register: cf_cat
|
||||
when: check_cf is changed
|
||||
|
||||
- name: Activating content filtering as a whole
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidguard-update
|
||||
when: check_cf is changed
|
|
@ -1,19 +0,0 @@
|
|||
- name: Configurazione scheda di rete esterna
|
||||
shell: /sbin/e-smith/db networks setprop {{ extnic }} role red bootproto dhcp
|
||||
sudo: yes
|
||||
|
||||
- name: Configurazione scheda di rete interna
|
||||
shell: /sbin/e-smith/db networks setprop {{ intnic }} role green ipaddr {{ ansible_local.domain.serverip }} netmask {{ ansible_local.domain.servernetmask }}
|
||||
sudo: yes
|
||||
|
||||
- name: Attivo configurazioni di rete
|
||||
shell: /sbin/e-smith/signal-event interface-update
|
||||
sudo: yes
|
||||
|
||||
- name: Configurazione rete trusted
|
||||
shell: /sbin/e-smith/db networks set {{ ansible_local.domain.servernet }} network Description "Local LAN" Mask {{ ansible_local.domain.servernetmask }}
|
||||
sudo: yes
|
||||
|
||||
- name: Modifico configurazioni
|
||||
shell: /sbin/e-smith/signal-event trusted-networks-modify
|
||||
sudo: yes
|
|
@ -1,262 +0,0 @@
|
|||
---
|
||||
- name: Verifica configurazione organizzazione
|
||||
shell: /sbin/e-smith/db configuration printprop OrganizationContact City
|
||||
register: check_org
|
||||
changed_when: "'City={{ ansible_local.domain.org_city }}' not in check_org.stdout"
|
||||
ignore_errors: yes
|
||||
sudo: yes
|
||||
|
||||
- name: Configurazione organizzazione
|
||||
shell: /sbin/e-smith/db configuration setprop OrganizationContact City "{{ ansible_local.domain.org_city }}" Company "{{ ansible_local.domain.org_company }}" CountryCode {{ ansible_local.domain.org_countrycode }} Department "{{ ansible_local.domain.org_department }}" PhoneNumber "{{ ansible_local.domain.org_phone }}" Street "{{ ansible_local.domain.org_street }}"
|
||||
sudo: yes
|
||||
when: check_org|changed
|
||||
|
||||
- name: Configurazione nome server
|
||||
shell: /sbin/e-smith/db configuration set SystemName {{ ansible_local.domain.server }}
|
||||
sudo: yes
|
||||
register: chg_hostname
|
||||
when: "'{{ ansible_hostname }}' != '{{ ansible_local.domain.server }}'"
|
||||
|
||||
- name: Configurazione nome dominio
|
||||
shell: /sbin/e-smith/db configuration set DomainName {{ ansible_local.domain.domainfull }}
|
||||
sudo: yes
|
||||
register: chg_domainname
|
||||
when: "'{{ ansible_domain }}' != '{{ ansible_local.domain.domainfull }}'"
|
||||
|
||||
- name: Attivazione cambiamenti hostname
|
||||
shell: /sbin/e-smith/signal-event hostname-modify
|
||||
sudo: yes
|
||||
when: chg_hostname|changed or chg_domainname|changed
|
||||
|
||||
- name: Verifica robustezza password
|
||||
shell: /sbin/e-smith/db configuration printprop passwordstrength Users
|
||||
register: chk_passstr
|
||||
changed_when: "'Users=none' not in chk_passstr.stdout"
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
|
||||
- name: Configurazione forza password
|
||||
shell: /sbin/e-smith/db configuration setprop passwordstrength PassExpires no Users none Admin strong MaxPassAge 180 MinPassAge 0 PassExpires no PassWarning 7
|
||||
sudo: yes
|
||||
when: chk_passstr|changed
|
||||
|
||||
- name: Attivo configurazione policy password
|
||||
shell: /sbin/e-smith/signal-event password-policy-update
|
||||
sudo: yes
|
||||
when: chk_passstr|changed
|
||||
|
||||
- name: Verifica configurazione DHCP
|
||||
shell: /sbin/e-smith/db dhcp getprop {{ intnic }} DhcpRangeStart
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
register: chk_dhcp
|
||||
|
||||
- name: Configurazione servizio DHCP
|
||||
shell: /sbin/e-smith/db dhcp set {{ intnic }} range DhcpRangeStart {{ ansible_local.domain.dhcprange_start }} DhcpRangeEnd {{ ansible_local.domain.dhcprange_end }} status enabled
|
||||
sudo: yes
|
||||
when: chk_dhcp|failed
|
||||
|
||||
- name: Attivazione configurazione DHCP
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
sudo: yes
|
||||
when: chk_dhcp|failed
|
||||
|
||||
- name: Verifica configurazione DNS
|
||||
shell: /sbin/e-smith/db configuration printprop dns NameServers
|
||||
sudo: yes
|
||||
register: chk_dns
|
||||
changed_when: "'NameServers={{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}' not in chk_dns.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Configurazione servizio DNS
|
||||
shell: /sbin/e-smith/db configuration setprop dns role resolver NameServers "{{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}"
|
||||
sudo: yes
|
||||
when: chk_dns|changed
|
||||
|
||||
- name: Attivo configurazione DNS
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
when: chk_dns|changed
|
||||
sudo: yes
|
||||
|
||||
- name: Verifica configurazione NTP
|
||||
shell: /sbin/e-smith/db configuration printprop ntpd NTPServer
|
||||
sudo: yes
|
||||
register: chk_ntp
|
||||
changed_when: "'NTPServer=ntp1.inrim.it' not in chk_ntp.stdout"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Configuro NTP
|
||||
shell: /sbin/e-smith/db configuration setprop ntpd NTPServer ntp1.inrim.it status enabled
|
||||
sudo: yes
|
||||
when: chk_ntp|changed
|
||||
|
||||
- name: Attivazione NTP
|
||||
shell: /sbin/e-smith/signal-event nethserver-ntp-update
|
||||
sudo: yes
|
||||
when: chk_ntp|changed
|
||||
|
||||
- name: Utilizzo unix extensions nei template per ibay
|
||||
replace:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/10global
|
||||
regexp: '^unix extensions = no$'
|
||||
replace: 'unix extensions = yes'
|
||||
sudo: yes
|
||||
|
||||
- name: Verifica configurazione SMB
|
||||
shell: /sbin/e-smith/db configuration printprop smb RoamingProfiles
|
||||
sudo: yes
|
||||
register: chk_smb
|
||||
changed_when: "'RoamingProfiles=yes' not in chk_smb.stdout"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Configurazione SMB
|
||||
shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ ansible_local.domain.domainshort }}" status enabled
|
||||
sudo: yes
|
||||
when: chk_smb|changed
|
||||
|
||||
- name: Attivo configurazione SMB
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||
sudo: yes
|
||||
when: chk_smb|changed
|
||||
|
||||
- name: Abilito il ricaricamento dei servizi smb su ibay-create
|
||||
file: src="reload" dest="{{ item }}/smb" state=link force=yes
|
||||
with_items:
|
||||
- /etc/e-smith/events/ibay-delete/services2adjust
|
||||
- /etc/e-smith/events/ibay-create/services2adjust
|
||||
- /etc/e-smith/events/ibay-modify/services2adjust
|
||||
sudo: yes
|
||||
|
||||
- name: Verifica creazione share condiviso
|
||||
shell: /sbin/e-smith/db accounts show shared
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
register: chk_shared
|
||||
|
||||
- name: Copying default templates for new template type
|
||||
shell: cp -r /etc/e-smith/templates/etc/samba/smb.conf/ibay-default /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared
|
||||
sudo: yes
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring ibay-shared template structure (directory mask)
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared/20profile_default
|
||||
line: 'directory mask = 0775'
|
||||
insertafter: '^create mask'
|
||||
state: present
|
||||
sudo: yes
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring force create mode
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared/20profile_default
|
||||
line: 'force create mode = 0664'
|
||||
insertafter: '^directory mask'
|
||||
state: present
|
||||
sudo: yes
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring force directory mode
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared/20profile_default
|
||||
line: 'force directory mode = 0775'
|
||||
insertafter: '^force create mode'
|
||||
state: present
|
||||
sudo: yes
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configurazione share Condiviso
|
||||
shell: /sbin/e-smith/db accounts set shared ibay AclRead domusers,domadmins AclWrite domusers,domadmins Description "Cartella condivisa" GroupAccess rw HttpStatus disabled OtherAccess r OwningGroup locals SmbAuditStatus enabled SmbGuestAccessType none SmbRecycleBinStatus enabled SmbRecycleBinVersionsStatus enabled SmbStatus enabled
|
||||
sudo: yes
|
||||
when: chk_shared|failed
|
||||
|
||||
- name: Attivazione share condiviso
|
||||
shell: /sbin/e-smith/signal-event ibay-create shared
|
||||
sudo: yes
|
||||
when: chk_shared|failed
|
||||
|
||||
- name: Changing ibay profile for shared
|
||||
shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared
|
||||
sudo: yes
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Forcing regeneration of smb.conf
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-update
|
||||
sudo: yes
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Verifica configurazione squid
|
||||
shell: /sbin/e-smith/db configuration printprop squid GreenMode
|
||||
sudo: yes
|
||||
ignore_errors: yes
|
||||
register: chk_squid
|
||||
changed_when: "'GreenMode=transparent_ssl' not in chk_squid.stdout"
|
||||
|
||||
- name: Configurazione squid
|
||||
shell: /sbin/e-smith/db configuration setprop squid BlueMode transparent_ssl GreenMode transparent_ssl PortBlock enabled status enabled DiskCache enabled DiskCacheSize 500
|
||||
sudo: yes
|
||||
when: chk_squid|changed
|
||||
|
||||
- name: Attivazione configurazione squid
|
||||
shell: /sbin/e-smith/signal-event nethserver-squid-update
|
||||
sudo: yes
|
||||
when: chk_squid|changed
|
||||
|
||||
- name: Verifica configurazione squidguard
|
||||
shell: /sbin/e-smith/db configuration printprop squidguard Lists
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
register: chk_squidguard
|
||||
changed_when: "'Lists=shalla' not in chk_squidguard.stdout"
|
||||
|
||||
- name: Configurazione squidguard
|
||||
shell: /sbin/e-smith/db configuration setprop squidguard Expressions enabled Lists shalla status enabled
|
||||
sudo: yes
|
||||
when: chk_squidguard|changed
|
||||
|
||||
- name: Scarico liste di filtraggio
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidguard-downloadlists
|
||||
sudo: yes
|
||||
when: chk_squidguard|changed
|
||||
|
||||
- name: Attivazione squidguard
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidguard-update
|
||||
sudo: yes
|
||||
when: chk_squidguard|changed
|
||||
|
||||
- name: Verifica configurazione squidclamav
|
||||
shell: /sbin/e-smith/db configuration printprop squidclamav status
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
register: chk_squidclamav
|
||||
changed_when: "'status=enabled' not in chk_squidclamav.stdout"
|
||||
|
||||
- name: Configurazione squidclamav
|
||||
shell: /sbin/e-smith/db configuration setprop squidclamav status enabled
|
||||
sudo: yes
|
||||
when: chk_squidclamav|changed
|
||||
|
||||
- name: Attivazione squidclamav
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidclamav-update
|
||||
sudo: yes
|
||||
when: chk_squidclamav|changed
|
||||
|
||||
- name: Verifica completamento configurazione per certificato
|
||||
shell: /sbin/e-smith/db configuration printprop pki CommonName
|
||||
sudo: yes
|
||||
ignore_errors: true
|
||||
register: chk_crt
|
||||
changed_when: "'CommonName={{ ansible_local.domain.serverfqdn }}' not in chk_crt.stdout"
|
||||
tags: regen-ca
|
||||
|
||||
- name: Completo la configurazione per produzione certificato
|
||||
shell: /sbin/e-smith/db configuration setprop pki CertificateDuration 3650 CommonName {{ ansible_local.domain.serverfqdn }} CountryCode {{ ansible_local.domain.org_countrycode }} EmailAddress {{ ansible_local.domain.org_email }} Locality "{{ ansible_local.domain.org_city }}" Organization "{{ ansible_local.domain.org_company }}"
|
||||
sudo: yes
|
||||
tags: regen-ca
|
||||
when: chk_crt|changed or force_regen_ca|bool
|
||||
|
||||
- name: Rigenero il certificato con le informazioni inserite
|
||||
shell: /sbin/e-smith/signal-event certificate-update
|
||||
sudo: yes
|
||||
when: chk_crt|changed or force_regen_ca|bool
|
||||
tags: regen-ca
|
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
|
||||
# SAMBA and ibays
|
||||
|
||||
- name: Installing SAMBA and ibays packages
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- nethserver-ibays
|
||||
- nethserver-samba
|
||||
- nethserver-samba-audit
|
||||
|
||||
# SAMBA
|
||||
|
||||
- name: "Verifying modifications on templates-custom."
|
||||
shell: grep -q 'server signing = mandatory' /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
register: check_tempcust
|
||||
changed_when: check_tempcust.rc != 0
|
||||
ignore_errors: true
|
||||
|
||||
- name: "Create directory structure for templates-custom"
|
||||
file:
|
||||
path: "/etc/e-smith/templates-custom/etc/samba/smb.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
state: directory
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: "Copying settings from default."
|
||||
copy:
|
||||
src: /etc/e-smith/templates/etc/samba/smb.conf/10global
|
||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: "Enabling unix extensions on SAMBA"
|
||||
replace:
|
||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
regexp: '^unix extensions = no$'
|
||||
replace: 'unix extensions = yes'
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: Adding server signing as mandatory
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
line: "server signing = mandatory"
|
||||
insertafter: "^workgroup = "
|
||||
state: present
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: Checking SMB configuration
|
||||
shell: /sbin/e-smith/db configuration printprop smb RoamingProfiles
|
||||
register: chk_smb
|
||||
changed_when: "'RoamingProfiles=yes' not in chk_smb.stdout"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Configuring SMB
|
||||
shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ ansible_local.domain.domainshort }}" status enabled
|
||||
when: chk_smb is changed
|
||||
|
||||
- name: Activating SMB
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||
when: chk_smb is changed
|
||||
|
||||
# ibays
|
||||
|
||||
- name: Enabling SMB services restart when managing ibays
|
||||
file:
|
||||
src: reload
|
||||
dest: "{{ item }}/smb"
|
||||
state: link
|
||||
force: yes
|
||||
with_items:
|
||||
- /etc/e-smith/events/ibay-delete/services2adjust
|
||||
- /etc/e-smith/events/ibay-create/services2adjust
|
||||
- /etc/e-smith/events/ibay-modify/services2adjust
|
||||
|
||||
- name: Checking for shared ibay
|
||||
shell: /sbin/e-smith/db accounts show shared
|
||||
ignore_errors: true
|
||||
register: chk_shared
|
||||
|
||||
- name: Copying default templates for shared template type
|
||||
shell: cp -r /etc/e-smith/templates/etc/samba/smb.conf/ibay-default /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
|
||||
- name: Configuring ibay-shared template structure (directory mask)
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared/20profile_default
|
||||
line: 'directory mask = 0775'
|
||||
insertafter: '^create mask'
|
||||
state: present
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
|
||||
- name: Configuring force create mode
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared/20profile_default
|
||||
line: 'force create mode = 0664'
|
||||
insertafter: '^directory mask'
|
||||
state: present
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
|
||||
- name: Configuring force directory mode
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared/20profile_default
|
||||
line: 'force directory mode = 0775'
|
||||
insertafter: '^force create mode'
|
||||
state: present
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
|
||||
- name: Configuring shared ibay
|
||||
shell: /sbin/e-smith/db accounts set shared ibay AclRead domusers,domadmins AclWrite domusers,domadmins Description "Cartella condivisa" GroupAccess rw HttpStatus disabled OtherAccess r OwningGroup locals SmbAuditStatus enabled SmbGuestAccessType none SmbRecycleBinStatus enabled SmbRecycleBinVersionsStatus enabled SmbStatus enabled
|
||||
when: chk_shared is failed
|
||||
|
||||
- name: Activating shared ibay
|
||||
shell: /sbin/e-smith/signal-event ibay-create shared
|
||||
become: yes
|
||||
when: chk_shared is failed
|
||||
|
||||
- name: Changing ibay profile for shared
|
||||
shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared
|
||||
become: yes
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
|
||||
- name: Saving new version of smb.conf
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||
become: yes
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: Forcing regeneration of smb.conf
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-update
|
||||
become: yes
|
||||
when: force_ibay_shared|bool or chk_shared is failed or check_tempcust is changed
|
||||
|
||||
# Fixing issue #3 - Configure sudo access for admin on server for operator
|
||||
# access
|
||||
# https://github.com/bglug-it/server-config/issues/3
|
||||
- name: Configuring sudo access for admin account
|
||||
lineinfile:
|
||||
dest: /etc/sudoers.d/admin
|
||||
line: 'admin ALL=(ALL:ALL) NOPASSWD: ALL'
|
||||
create: yes
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0440
|
||||
validate: 'visudo -cf %s'
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
neth_pkgs:
|
||||
- nethserver-tftp
|
||||
- nethserver-ibays
|
||||
- nethserver-samba
|
||||
- nethserver-samba-audit
|
||||
- nethserver-cups
|
||||
- nethserver-avahi
|
||||
- nethserver-dnsmasq
|
||||
- nethserver-collectd
|
||||
- nethserver-collectd-web
|
||||
- nethserver-squid
|
||||
- nethserver-squidclamav
|
||||
- nethserver-squidguard
|
||||
- nethserver-firewall-base
|
||||
- nethserver-backup-config
|
||||
- nethserver-backup-data
|
|
@ -5,4 +5,4 @@
|
|||
yum:
|
||||
pkg: nethserver-networkpackagemanager
|
||||
state: latest
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
# Install and configure openvpn to be a client for vpn.
|
||||
|
||||
- name: Installing openvpn
|
||||
yum:
|
||||
pkg: nethserver-openvpn
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- name: Temporarily enabling roadwarrior server
|
||||
shell: /sbin/e-smith/db configuration setprop openvpn ServerStatus enabled Network 192.168.101.1 Netmask 255.255.255.0
|
||||
become: yes
|
||||
|
||||
- name: Triggering activation
|
||||
shell: /sbin/e-smith/signal-event nethserver-openvpn-save
|
||||
become: yes
|
||||
|
||||
- name: Deconfiguring it to install client
|
||||
shell: /sbin/e-smith/db configuration setprop openvpn ServerStatus disabled
|
||||
become: yes
|
||||
|
||||
- name: Signaling disactivation
|
||||
shell: /sbin/e-smith/signal-event nethserver-openvpn-save
|
||||
|
||||
# Getting configuration from outside
|
|
@ -1,2 +1,13 @@
|
|||
---
|
||||
# Defaults for installation
|
||||
edu_package: secondary
|
||||
mirror_mode: local
|
||||
mirror_host: archive.ubuntu.com
|
||||
mirror_path: /ubuntu
|
||||
mirror_security_host: security.ubuntu.com
|
||||
mirror_security_path: /ubuntu
|
||||
mirror_localpath: /ks/mirror
|
||||
execpath: ""
|
||||
execsecurepath: ""
|
||||
execmirrorpath: ""
|
||||
development: false
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
state: directory
|
||||
owner: root
|
||||
mode: 0755
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: 'Utilizzo cert8.db precedentemente fornito (pulito da FF appena aperto)'
|
||||
copy:
|
||||
|
@ -21,15 +21,15 @@
|
|||
dest: /var/lib/nethserver/ibay/ks/server-ca/cert8.db
|
||||
owner: root
|
||||
mode: 0644
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Integro la CA nel db
|
||||
shell: certutil -A -n "{{ ansible_local.domain.domainfull }}" -t "TCu,Cuw,Tuw" -i /tmp/ca.crt -d /var/lib/nethserver/ibay/ks/server-ca
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Pulizia
|
||||
shell: rm -f {{ item }}
|
||||
sudo: yes
|
||||
become: yes
|
||||
with_items:
|
||||
- /tmp/ca.crt
|
||||
- /var/lib/nethserver/ibay/ks/server-ca/key3.db
|
||||
|
|
|
@ -1,14 +1,24 @@
|
|||
---
|
||||
|
||||
- name: Configuring executive mirror path
|
||||
set_fact:
|
||||
execmirrorpath: "{{ ansible_local.domain.mirrorpath }}"
|
||||
when: ansible_local.domain.mirror_mode == 'nfs' or ansible_local.domain.mirror_mode == 'local'
|
||||
- include: mirror-cfg.yml
|
||||
tags:
|
||||
- preseed
|
||||
- repoconfig
|
||||
|
||||
- include: preseed.yml
|
||||
tags:
|
||||
- preseed
|
||||
|
||||
- include: repoconfig.yml
|
||||
tags:
|
||||
- preseed
|
||||
- repoconfig
|
||||
|
||||
- include: firefoxcert.yml
|
||||
tags:
|
||||
- firefox
|
||||
|
||||
- include: paperms.yml
|
||||
tags:
|
||||
- preseed
|
||||
- paperms
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
# Determining other variables to be used inside templates
|
||||
|
||||
- name: Determining mirror_mode
|
||||
set_fact: mirror_mode="{{ ansible_local.domain.mirror_mode }}"
|
||||
when: "ansible_local.domain.mirror_mode is defined"
|
||||
|
||||
- name: Determining mirror_host
|
||||
set_fact:
|
||||
mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||
orig_mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||
when: ansible_local.domain.mirror_host is defined
|
||||
|
||||
- name: Determining mirror_path
|
||||
set_fact:
|
||||
mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||
orig_mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||
when: ansible_local.domain.mirror_path is defined
|
||||
|
||||
- name: Determining mirror_security_host
|
||||
set_fact:
|
||||
mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||
orig_mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||
when: ansible_local.domain.mirror_security_host is defined
|
||||
|
||||
- name: Determining mirror_security_path
|
||||
set_fact:
|
||||
mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||
orig_mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||
when: ansible_local.domain.mirror_security_path is defined
|
||||
|
||||
- name: Determining mirror_localpath
|
||||
set_fact: mirror_localpath="{{ ansible_local.domain.mirror_localpath }}"
|
||||
when: ansible_local.domain.mirror_localpath is defined
|
||||
|
||||
# The remote option is already configured as it is.
|
||||
|
||||
# Configuring correctly local mirror
|
||||
- name: Altering paths
|
||||
set_fact:
|
||||
execmirrorpath: "{{ mirror_host }}{{ mirror_path }}"
|
||||
execsecurepath: "{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||
execpath: "{{ ansible_local.domain.serverfqdn }}{{ mirror_localpath }}/"
|
||||
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
||||
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||
mirror_security_path: "{{ mirror_localpath }}/{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||
mirror_security_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||
when: mirror_mode != 'remote'
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
# Installing fixes final fixes for PulseAudio permissions.
|
||||
|
||||
- name: Creating paperms subdir inside ks/preseed share
|
||||
file:
|
||||
path: /var/lib/nethserver/ibay/ks/paperms
|
||||
state: directory
|
||||
owner: root
|
||||
group: locals
|
||||
mode: 0755
|
||||
become: yes
|
||||
|
||||
- name: Deploy template files for paperms
|
||||
template:
|
||||
src: "paperms/{{ item }}"
|
||||
dest: "/var/lib/nethserver/ibay/ks/paperms/{{ item }}"
|
||||
owner: root
|
||||
group: locals
|
||||
mode: 0644
|
||||
with_items:
|
||||
- updategrp.py
|
||||
- paperms.sh
|
||||
- cronjob
|
||||
- logrotate
|
||||
become: yes
|
|
@ -1,37 +1,43 @@
|
|||
---
|
||||
|
||||
- name: Configure the edu-package following settings in domain.yml
|
||||
set_fact:
|
||||
edu_package: "{{ ansible_local.domain.edu_package }}"
|
||||
when: ansible_local.domain.edu_package is defined
|
||||
|
||||
- name: Verifica configurazione ibay preseed
|
||||
shell: /sbin/e-smith/db accounts show ks
|
||||
register: chk_ks_created
|
||||
changed_when: chk_ks_created.rc != 0
|
||||
ignore_errors: yes
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Configurazione web preseed
|
||||
shell: /sbin/e-smith/db accounts set ks ibay Description "Preseed share" GroupAccess rw HttpAccess private HttpAliasType default HttpAllowOverrideStatus disabled HttpForceSslStatus disabled HttpPasswordStatus disabled HttpStatus enabled HttpVirtualHost __ANY__ OtherAccess r OwningGroup locals SmbAuditStatus disabled SmbStatus disabled
|
||||
when: chk_ks_created|failed
|
||||
sudo: yes
|
||||
when: chk_ks_created is failed
|
||||
become: yes
|
||||
|
||||
- name: Attivazione web preseed
|
||||
shell: /sbin/e-smith/signal-event ibay-create ks
|
||||
when: chk_ks_created|failed
|
||||
sudo: yes
|
||||
when: chk_ks_created is failed
|
||||
become: yes
|
||||
|
||||
- name: Verifica presenza directory mirror
|
||||
file: path=/var/spool/apt-mirror/mirror state=directory
|
||||
register: chk_mirror_dir
|
||||
ignore_errors: yes
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Collegamento directory mirror
|
||||
file: path=/var/lib/nethserver/ibay/ks/mirror src=/var/spool/apt-mirror/mirror state=link
|
||||
sudo: yes
|
||||
when: chk_mirror_dir|success
|
||||
become: yes
|
||||
when: chk_mirror_dir is succeeded
|
||||
|
||||
- name: Creazione directory preseed
|
||||
file:
|
||||
path: "/var/lib/nethserver/ibay/ks/preseed"
|
||||
state: directory
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: Copia profili preseed
|
||||
template:
|
||||
|
@ -41,7 +47,24 @@
|
|||
- edubuntu.seed
|
||||
- client-trusty.seed
|
||||
- docenti-trusty.seed
|
||||
sudo: yes
|
||||
- aula-trusty.seed
|
||||
become: yes
|
||||
|
||||
- block:
|
||||
- name: Creating development directory
|
||||
file:
|
||||
path: "/var/lib/nethserver/ibay/ks/preseed/dev"
|
||||
state: directory
|
||||
|
||||
- name: Preseeding profiles - development
|
||||
template:
|
||||
src: 'preseed/dev/{{ item }}'
|
||||
dest: '/var/lib/nethserver/ibay/ks/preseed/dev/{{ item }}'
|
||||
with_items:
|
||||
- client-trusty.seed
|
||||
- docenti-trusty.seed
|
||||
when: development|bool
|
||||
become: yes
|
||||
|
||||
- name: Copia script post-installazione
|
||||
template:
|
||||
|
@ -50,6 +73,6 @@
|
|||
with_items:
|
||||
- postseed-client.sh
|
||||
- postseed-docenti.sh
|
||||
- pulseaudio-perms.sh
|
||||
- postseed-aula.sh
|
||||
- checksum.fact
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
# Configuring the base repositories files.
|
||||
# Composing here files to be used by clients will reduce time to load/construct
|
||||
# them within client-pull-installation playbook.
|
||||
|
||||
- name: Creating base directory for storing repositories files
|
||||
file:
|
||||
path: /var/lib/nethserver/ibay/ks/repoconfig
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
become: yes
|
||||
|
||||
- name: Preconfiguring base repositories file for clients
|
||||
template:
|
||||
src: repoconfig/sources.list
|
||||
dest: /var/lib/nethserver/ibay/ks/repoconfig/sources.list
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
become: yes
|
||||
|
||||
- name: Preconfiguring other repositories for clients
|
||||
template:
|
||||
src: "repoconfig/{{ item }}"
|
||||
dest: "/var/lib/nethserver/ibay/ks/repoconfig/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- bglug-trusty.list
|
||||
- ansible-ansible-trusty.list
|
||||
- libreoffice-ppa-trusty.list
|
||||
- epoptes-ppa-trusty.list
|
||||
- geogebra-stable.list
|
||||
become: yes
|
||||
|
||||
- name: Pre-downloading geogebra GPG signature because of HTTPS
|
||||
get_url:
|
||||
url: "https://www.geogebra.net/linux/office@geogebra.org.gpg.key"
|
||||
dest: "/var/lib/nethserver/ibay/ks/repoconfig/office_geogebra.gpg.key"
|
||||
validate_certs: no
|
||||
become: yes
|
|
@ -1,2 +0,0 @@
|
|||
deb http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
# deb-src http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
|
@ -1,2 +0,0 @@
|
|||
deb http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
deb-src http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
|
@ -0,0 +1 @@
|
|||
@reboot root /var/lib/{{ ansible_local.domain.domainfull }}/bin/paperms.sh >> /var/log/paperms.log 2>&1
|
|
@ -0,0 +1,7 @@
|
|||
/var/log/paperms.log {
|
||||
rotate 7
|
||||
daily
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Fixing base variables
|
||||
basedir=/var/lib/{{ ansible_local.domain.domainfull }}
|
||||
|
||||
# Making sure destination folder exists.
|
||||
/usr/bin/install -d -o root -g users ${basedir}/bin
|
||||
|
||||
# Update this script itself
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/paperms.sh -O ${basedir}/bin/paperms.sh
|
||||
/bin/chown root:users ${basedir}/bin/paperms.sh
|
||||
/bin/chmod a+x ${basedir}/bin/paperms.sh
|
||||
|
||||
# Updating cronjob
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/cronjob -O /etc/cron.d/paperms
|
||||
/bin/chown root:root /etc/cron.d/paperms
|
||||
/bin/chmod 0644 /etc/cron.d/paperms
|
||||
|
||||
# Removing old versions of the cronjob
|
||||
rm -f /etc/cron.d/pulseaudio-perms
|
||||
|
||||
# Updating logrotate
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/logrotate -O /etc/logrotate.d/paperms
|
||||
/bin/chown root:root /etc/logrotate.d/paperms
|
||||
/bin/chmod 0644 /etc/logrotate.d/paperms
|
||||
|
||||
# Updating updategrp.py
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/updategrp.py -O ${basedir}/bin/updategrp.py
|
||||
/bin/chown root:users ${basedir}/bin/updategrp.py
|
||||
/bin/chmod a+x ${basedir}/bin/updategrp.py
|
||||
|
||||
# Main part: run updategrp.py
|
||||
/usr/bin/wbinfo -t && /usr/bin/python2 ${basedir}/bin/updategrp.py "domain users" "pulse" || echo "Not in domain."
|
||||
/usr/bin/wbinfo -t && /usr/bin/python2 ${basedir}/bin/updategrp.py "domain users" "pulse-access" || echo "Not in domain."
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/env python2
|
||||
|
||||
from __future__ import print_function
|
||||
import grp
|
||||
import re
|
||||
from subprocess import check_output
|
||||
from sys import argv
|
||||
|
||||
class UpdateGrp:
|
||||
|
||||
def __init__(self, leftname = "domain users", rightname = "pulse"):
|
||||
"""Confronts members of the LHS group with the members of the RHS group. LHS group defaults to "domain users"."""
|
||||
self.leftname = leftname
|
||||
self.rightname = rightname
|
||||
self.leftmembers = grp.getgrnam(self.leftname)[3]
|
||||
self.rightmembers = grp.getgrnam(self.rightname)[3]
|
||||
|
||||
# Since there is also a local user already created on the machine but
|
||||
# it is not a domain user, we will add it to leftmembers
|
||||
self.leftmembers.append("bglug")
|
||||
|
||||
self.to_add = list(set(self.leftmembers) - set(self.rightmembers))
|
||||
self.to_remove = list(set(self.rightmembers) - set(self.leftmembers))
|
||||
|
||||
def update_rhs(self):
|
||||
"""Updates the RHS group members to be equal to the LHS group members."""
|
||||
# If RHS is a local group
|
||||
with open('/etc/group', 'r') as group:
|
||||
for grp in group.readlines():
|
||||
if re.match("%s:" % self.rightname, grp):
|
||||
# If to_add is not empty, add each element to group
|
||||
if len(self.to_add) > 0:
|
||||
for user in self.to_add:
|
||||
print(check_output(["gpasswd", "-a", user, self.rightname]), end='')
|
||||
|
||||
# If to_remove is not empty, remove each element to group
|
||||
if len(self.to_remove) > 0:
|
||||
for user in self.to_remove:
|
||||
print(check_output(["gpasswd", "-d", user, self.rightname]), end='')
|
||||
|
||||
def update_lhs(self):
|
||||
"""Updates the LHS group members to be equal to the RHS group members."""
|
||||
# If LHS is a local group
|
||||
with open('/etc/group', 'r') as group:
|
||||
for grp in group.readline():
|
||||
if re.match("%s:" % self.leftname, grp):
|
||||
# If to_remove is not empty, add each element to group
|
||||
if len(self.to_remove) > 0:
|
||||
for user in self.to_remove:
|
||||
print(check_output(["gpasswd", "-a", user, self.leftname]), end='')
|
||||
|
||||
# If to_add is not empty, remove each element to group
|
||||
if len(self.to_add) > 0:
|
||||
for user in self.to_add:
|
||||
print(check_output(["gpasswd", "-d", user, self.leftname]), end='')
|
||||
|
||||
|
||||
def modprint(self):
|
||||
"""Debug function to print only modifications."""
|
||||
print("To add: ", end='')
|
||||
print(self.to_add)
|
||||
print("To remove: ", end='')
|
||||
print(self.to_remove)
|
||||
|
||||
# When run interactively
|
||||
if __name__ == '__main__':
|
||||
# If the first argument is '--help' or '-h', or number of arguments less than 1 and more than 2, print help.
|
||||
if len(argv) < 2 or len(argv) > 3 or argv[1] == '--help' or argv[1] == '-h':
|
||||
print("Usage: %s <LHSgroup> <RHSgroup>" % argv[0])
|
||||
print("Aligns RHS group members as LHS.")
|
||||
|
||||
else:
|
||||
updgrp = UpdateGrp(argv[1], argv[2])
|
||||
updgrp.update_rhs()
|
|
@ -0,0 +1,134 @@
|
|||
# No questions if possible
|
||||
debconf debconf/priority string critical
|
||||
|
||||
# Localization - Italiano
|
||||
d-i debian-installer/locale string it_IT.UTF-8
|
||||
d-i debian-installer/supported-locales multiselect it_IT it_IT@euro en_US en_US.UTF-8
|
||||
|
||||
# Keyboard settings
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i keyboard-configuration/layoutcode string it
|
||||
|
||||
# Network
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# Adjust the default hostname.
|
||||
d-i netcfg/hostname string kickseed
|
||||
|
||||
# Enabling non-free firmware
|
||||
d-i hw-detect/load_firmware boolean true
|
||||
|
||||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable epoptes PPA
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local2/comment string Epoptes stable repository
|
||||
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x2D9B9274D3DF9D7CD7281A3E49F26CB30350B375&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local3/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local3/comment string Geogebra Official repository
|
||||
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
d-i clock-setup/ntp boolean true
|
||||
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/mount_style select uuid
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
||||
# No asking for installation in language
|
||||
d-i pkgsel/install-language-support boolean true
|
||||
d-i pkgsel/ignore-incomplete-language-support boolean true
|
||||
d-i localechooser/translation/warn-severe boolean true
|
||||
d-i localechooser/translation/warn-light boolean true
|
||||
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
d-i pkgsel/language-packs multiselect it, en
|
||||
|
||||
# Disable popularity contest
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Install both GNOME and KDE translation packages.
|
||||
d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub webbrowser-app epoptes epoptes-client; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-aula.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
||||
# Grub installation on MBR
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/bootdev string /dev/sda
|
||||
|
||||
# No reboot message
|
||||
d-i finish-install/reboot_in_progress note
|
|
@ -21,42 +21,42 @@ d-i hw-detect/load_firmware boolean true
|
|||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
{% if execmirrorpath != '' %}
|
||||
d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }}
|
||||
d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu
|
||||
{% else %}
|
||||
d-i mirror/http/hostname string archive.ubuntu.com
|
||||
d-i mirror/http/directory string /ubuntu
|
||||
{% endif %}
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean false
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
{% if execmirrorpath != '' %}
|
||||
d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }}
|
||||
d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu
|
||||
{% else %}
|
||||
d-i apt-setup/security_host string security.ubuntu.com
|
||||
d-i apt-setup/security_path string /ubuntu
|
||||
{% endif %}
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable epoptes PPA
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local2/comment string Epoptes stable repository
|
||||
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x2D9B9274D3DF9D7CD7281A3E49F26CB30350B375&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local3/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local3/comment string Geogebra Official repository
|
||||
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
|
@ -66,7 +66,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
|
@ -84,6 +84,7 @@ d-i user-setup/encrypt-home boolean false
|
|||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
@ -97,7 +98,7 @@ d-i localechooser/translation/warn-light boolean true
|
|||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# UPgrade after installation: no
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
|
@ -111,16 +112,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
|||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub webbrowser-app epoptes; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target /bin/bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
# No questions if possible
|
||||
debconf debconf/priority string critical
|
||||
|
||||
# Localization - Italiano
|
||||
d-i debian-installer/locale string it_IT.UTF-8
|
||||
d-i debian-installer/supported-locales multiselect it_IT it_IT@euro en_US en_US.UTF-8
|
||||
|
||||
# Keyboard settings
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i keyboard-configuration/layoutcode string it
|
||||
|
||||
# Network
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# Adjust the default hostname.
|
||||
d-i netcfg/hostname string kickseed
|
||||
|
||||
# Enabling non-free firmware
|
||||
d-i hw-detect/load_firmware boolean true
|
||||
|
||||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
d-i mirror/udeb/components multiselect main, restricted, universe, multiverse
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local2/comment string Geogebra Official repository
|
||||
d-i apt-setup/local2/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
d-i clock-setup/ntp boolean true
|
||||
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/mount_style select uuid
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
||||
# No asking for installation in language
|
||||
d-i pkgsel/install-language-support boolean true
|
||||
d-i pkgsel/ignore-incomplete-language-support boolean true
|
||||
d-i localechooser/translation/warn-severe boolean true
|
||||
d-i localechooser/translation/warn-light boolean true
|
||||
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
d-i pkgsel/language-packs multiselect it, en
|
||||
|
||||
# Disable popularity contest
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Install both GNOME and KDE translation packages.
|
||||
d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target /bin/bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
||||
# Grub installation on MBR
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/bootdev string /dev/sda
|
||||
|
||||
# No reboot message
|
||||
d-i finish-install/reboot_in_progress note
|
||||
# Powering off machine.
|
||||
d-i debian-installer/exit/poweroff boolean true
|
|
@ -0,0 +1,132 @@
|
|||
# No questions if possible
|
||||
debconf debconf/priority string critical
|
||||
|
||||
# Localization - Italiano
|
||||
d-i debian-installer/locale string it_IT.UTF-8
|
||||
d-i debian-installer/supported-locales multiselect it_IT it_IT@euro en_US en_US.UTF-8
|
||||
|
||||
# Keyboard settings
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i keyboard-configuration/layoutcode string it
|
||||
|
||||
# Network
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# Adjust the default hostname.
|
||||
d-i netcfg/hostname string kickseed
|
||||
|
||||
# Enabling non-free firmware
|
||||
d-i hw-detect/load_firmware boolean true
|
||||
|
||||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
d-i mirror/udeb/components multiselect main, restricted, universe, multiverse
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local2/comment string Geogebra Official repository
|
||||
d-i apt-setup/local2/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
d-i clock-setup/ntp boolean true
|
||||
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/mount_style select uuid
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
||||
# No asking for installation in language
|
||||
d-i pkgsel/install-language-support boolean true
|
||||
d-i pkgsel/ignore-incomplete-language-support boolean true
|
||||
d-i localechooser/translation/warn-severe boolean true
|
||||
d-i localechooser/translation/warn-light boolean true
|
||||
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
d-i pkgsel/language-packs multiselect it, en
|
||||
|
||||
# Disable popularity contest
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Install both GNOME and KDE translation packages.
|
||||
d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
||||
# Grub installation on MBR
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/bootdev string /dev/sda
|
||||
|
||||
# No reboot message
|
||||
d-i finish-install/reboot_in_progress note
|
||||
# Halting machine once created.
|
||||
d-i debian-installer/exit/poweroff boolean true
|
|
@ -21,42 +21,42 @@ d-i hw-detect/load_firmware boolean true
|
|||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
{% if execmirrorpath != '' %}
|
||||
d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }}
|
||||
d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu
|
||||
{% else %}
|
||||
d-i mirror/http/hostname string archive.ubuntu.com
|
||||
d-i mirror/http/directory string /ubuntu
|
||||
{% endif %}
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean false
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
{% if execmirrorpath != '' %}
|
||||
d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }}
|
||||
d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu
|
||||
{% else %}
|
||||
d-i apt-setup/security_host string security.ubuntu.com
|
||||
d-i apt-setup/security_path string /ubuntu
|
||||
{% endif %}
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable epoptes PPA
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local2/comment string Epoptes stable repository
|
||||
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x2D9B9274D3DF9D7CD7281A3E49F26CB30350B375&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local3/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local3/comment string Geogebra Official repository
|
||||
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
|
@ -66,7 +66,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
|
@ -84,6 +84,7 @@ d-i user-setup/encrypt-home boolean false
|
|||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
@ -97,7 +98,7 @@ d-i localechooser/translation/warn-light boolean true
|
|||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# UPgrade after installation: no
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
|
@ -111,16 +112,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
|||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub webbrowser-app epoptes-client; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
|
|
@ -22,39 +22,28 @@ d-i hw-detect/load_firmware boolean true
|
|||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
{% if execmirrorpath != '' %}
|
||||
d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }}
|
||||
d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu
|
||||
{% else %}
|
||||
d-i mirror/http/hostname string archive.ubuntu.com
|
||||
d-i mirror/http/directory string /ubuntu
|
||||
{% endif %}
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
{% if execmirrorpath != '' %}
|
||||
d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }}
|
||||
d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu
|
||||
{% else %}
|
||||
d-i apt-setup/security_host string security.ubuntu.com
|
||||
d-i apt-setup/security_path string /ubuntu
|
||||
{% endif %}
|
||||
d-i apt-setup/multiverse boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execmirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execmirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
|
@ -80,6 +69,7 @@ d-i user-setup/encrypt-home boolean false
|
|||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
@ -93,7 +83,7 @@ d-i localechooser/translation/warn-light boolean true
|
|||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# UPgrade after installation: no
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
|
@ -107,16 +97,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
|||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome sysv-rc-conf virtualbox-guest-dkms
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-{{ edu_package }} libnss-myhostname geogebra geogebra-gnome sysv-rc-conf virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome sysv-rc-conf
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-{{ edu_package }} libnss-myhostname geogebra geogebra-gnome sysv-rc-conf
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub; \
|
||||
in-target apt-get -y autoremove; \
|
||||
in-target sed -i'' -e 's/ubuntu/gnome-fallback/g' /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Cambio username con quello fornito da servizio
|
||||
TARGETHOSTNAME=$(/usr/bin/wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname?role=aula)
|
||||
echo $TARGETHOSTNAME > /etc/hostname
|
||||
/bin/sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||
|
||||
# Installo i file necessari per ansible.
|
||||
/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
domaingroup="domain users"
|
||||
localgroups="pulse pulse-access"
|
||||
|
||||
baseusers="bglug"
|
||||
domainusers="$(getent group "${domaingroup}" | awk 'BEGIN { FS = ":" } ; { print $4 }' | sed -e 's/,/ /g')"
|
||||
|
||||
users="${baseusers} ${domainusers}"
|
||||
|
||||
for group in ${localgroups}; do
|
||||
actualusers=$(getent group '${group}' | awk 'BEGIN { FS = ":" }; { print $4 }' | sed -e 's/,/ /g')
|
||||
|
||||
# Removing users not in the group
|
||||
for user in ${actualusers}; do
|
||||
whuser=${user//[[:space:]]/}
|
||||
echo "removing ${user}"
|
||||
[[ "${users}" =~ "${whuser}" ]] || gpasswd -d "${whuser}" "${group}"
|
||||
unset whuser
|
||||
done
|
||||
|
||||
# Adding users to group
|
||||
for user in ${users}; do
|
||||
whuser=${user//[[:space:]]/}
|
||||
[[ "${actualusers}" =~ "${whuser}" ]] || gpasswd -a "${whuser}" "${group}"
|
||||
done
|
||||
done
|
|
@ -0,0 +1,2 @@
|
|||
deb http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
# deb-src http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
|
@ -0,0 +1,3 @@
|
|||
# Repo BgLUG
|
||||
deb http://{{ execpath }}repo.bglug.it/ubuntu trusty main
|
||||
#deb-src http://{{ execpath }}repo.bglug.it/ubuntu trusty main
|
|
@ -0,0 +1,2 @@
|
|||
deb http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
#deb-src http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
|
@ -0,0 +1 @@
|
|||
deb http://{{ execpath }}www.geogebra.net/linux stable main
|
|
@ -0,0 +1,2 @@
|
|||
deb http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
#deb-src http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
|
@ -0,0 +1,19 @@
|
|||
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
# Sources
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
# Security
|
||||
deb http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||
|
||||
# Extras
|
||||
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
||||
deb http://{{ execpath }}archive.canonical.com/ trusty partner
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
development: false
|
|
@ -1,3 +1,10 @@
|
|||
---
|
||||
# PXE services
|
||||
- include: tftp.yml
|
||||
become: yes
|
||||
tags: tftp
|
||||
|
||||
# PXE configuration
|
||||
- include: pxe.yml
|
||||
become: yes
|
||||
tags: pxe
|
||||
|
|
|
@ -1,96 +1,79 @@
|
|||
---
|
||||
# Configurazione dell'ambiente di boot via rete per i client
|
||||
# Configuring other aspects for PXE
|
||||
|
||||
- name: Verifica configurazione tftp
|
||||
shell: /sbin/e-smith/db configuration getprop dnsmasq dhcp-boot
|
||||
register: chk_tftp_enabled
|
||||
changed_when: "'pxelinux.0' not in chk_tftp_enabled.stdout"
|
||||
ignore_errors: yes
|
||||
sudo: yes
|
||||
|
||||
- name: Configuro tftp
|
||||
shell: /sbin/e-smith/db configuration setprop dnsmasq tftp-status enabled dhcp-boot pxelinux.0
|
||||
when: chk_tftp_enabled|changed
|
||||
sudo: yes
|
||||
|
||||
- name: Attivo tftp
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
when: chk_tftp_enabled|changed
|
||||
sudo: yes
|
||||
|
||||
- name: Creo directory necessarie
|
||||
file: path={{ item }} state=directory
|
||||
- name: Creating mandatory directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- /var/lib/tftpboot/pxelinux.cfg
|
||||
- /var/lib/tftpboot/ubuntu/14.04/i386
|
||||
- /var/lib/tftpboot/ubuntu/14.04/amd64
|
||||
- /var/lib/tftpboot/utils/memtest86
|
||||
sudo: yes
|
||||
|
||||
- name: pxelinux.0
|
||||
get_url:
|
||||
url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/pxelinux.0
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/utopic-netboot/pxelinux.0"
|
||||
dest: /var/lib/tftpboot/pxelinux.0
|
||||
sudo: yes
|
||||
|
||||
- name: pxelinux.cfg/default
|
||||
template: src=pxelinux.cfg/default dest=/var/lib/tftpboot/pxelinux.cfg/default
|
||||
sudo: yes
|
||||
template:
|
||||
src: pxelinux.cfg/default
|
||||
dest: /var/lib/tftpboot/pxelinux.cfg/default
|
||||
when: development is not defined or development|bool == false
|
||||
|
||||
- name: pxelinux.cfg/default - development
|
||||
template:
|
||||
src: pxelinux.cfg/default.dev
|
||||
dest: /var/lib/tftpboot/pxelinux.cfg/default
|
||||
when: development is defined and development|bool
|
||||
|
||||
- name: bglug.png
|
||||
copy: src=bglug.png dest=/var/lib/tftpboot/utils/bglug.png
|
||||
sudo: yes
|
||||
copy:
|
||||
src: bglug.png
|
||||
dest: /var/lib/tftpboot/utils/bglug.png
|
||||
|
||||
- name: vesamenu.c32
|
||||
get_url:
|
||||
url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/vesamenu.c32
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/vesamenu.c32"
|
||||
dest: /var/lib/tftpboot/utils/vesamenu.c32
|
||||
sudo: yes
|
||||
|
||||
- name: chain.c32
|
||||
get_url:
|
||||
url: "http://bglug.sys42.eu/chain.c32"
|
||||
url: "http://repo.bglug.it/pxelinux/chain.c32"
|
||||
dest: /var/lib/tftpboot/utils/chain.c32
|
||||
sudo: yes
|
||||
|
||||
- name: linux i386
|
||||
get_url:
|
||||
url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/i386/linux
|
||||
sudo: yes
|
||||
|
||||
- name: initrd.gz i386
|
||||
get_url:
|
||||
url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/i386/initrd.gz
|
||||
sudo: yes
|
||||
|
||||
- name: linux amd64
|
||||
get_url:
|
||||
url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/amd64/linux
|
||||
sudo: yes
|
||||
|
||||
- name: initrd.gz amd64
|
||||
get_url:
|
||||
url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/amd64/initrd.gz
|
||||
sudo: yes
|
||||
|
||||
- name: memdisk
|
||||
get_url:
|
||||
url: http://sys42.eu/pxe-bootimg/memdisk
|
||||
url: "http://repo.bglug.it/pxelinux/memdisk"
|
||||
dest: /var/lib/tftpboot/utils/memdisk
|
||||
sudo: yes
|
||||
|
||||
- name: memtest86
|
||||
get_url:
|
||||
url: http://sys42.eu/pxe-bootimg/memtest86/vmlinuz
|
||||
url: "http://repo.bglug.it/pxelinux/memtest86/vmlinuz"
|
||||
dest: /var/lib/tftpboot/utils/memtest86/vmlinuz
|
||||
sudo: yes
|
||||
|
||||
- name: hdt
|
||||
get_url:
|
||||
url: http://sys42.eu/pxe-bootimg/hdt.img
|
||||
url: "http://repo.bglug.it/pxelinux/hdt.img"
|
||||
dest: /var/lib/tftpboot/utils/hdt.img
|
||||
sudo: yes
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
# TFTP
|
||||
|
||||
- name: Installing TFTP
|
||||
yum:
|
||||
name: nethserver-tftp
|
||||
state: present
|
||||
|
||||
- name: Checking TFTP configuration
|
||||
shell: /sbin/e-smith/db configuration getprop dnsmasq dhcp-boot
|
||||
register: chk_tftp_enabled
|
||||
changed_when: "'pxelinux.0' not in chk_tftp_enabled.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Configuring TFTP
|
||||
shell: /sbin/e-smith/db configuration setprop dnsmasq tftp-status enabled dhcp-boot pxelinux.0
|
||||
when: chk_tftp_enabled is changed
|
||||
|
||||
- name: Activating tftp
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
when: chk_tftp_enabled is changed
|
|
@ -12,35 +12,89 @@ LABEL local
|
|||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL client
|
||||
MENU LABEL Installa nuova macchina CLIENT
|
||||
MENU BEGIN
|
||||
MENU TITLE Installa nuova macchina CLIENT
|
||||
|
||||
LABEL client-32bit
|
||||
MENU LABEL ^32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/client-trusty.seed -- quiet
|
||||
|
||||
LABEL client-64bit
|
||||
MENU LABEL ^64 bit
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/client-trusty.seed -- quiet
|
||||
|
||||
LABEL docenti
|
||||
MENU LABEL Installa nuova macchina DOCENTI
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return-client
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU BEGIN
|
||||
MENU TITLE Installa nuova macchina DOCENTI
|
||||
|
||||
LABEL docenti-32bit
|
||||
MENU LABEL ^32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/docenti-trusty.seed -- quiet
|
||||
|
||||
LABEL docenti-64bit
|
||||
MENU LABEL ^64 bit
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/docenti-trusty.seed -- quiet
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return-docenti
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU BEGIN
|
||||
MENU TITLE Installa nuova macchina AULA
|
||||
|
||||
LABEL aula-32bit
|
||||
MENU LABEL ^32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/aula-trusty.seed -- quiet
|
||||
|
||||
LABEL aula-64bit
|
||||
MENU LABEL ^64 bit
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/aula-trusty.seed -- quiet
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return-aula
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
MENU BEGIN
|
||||
MENU TITLE Edubuntu Classica
|
||||
|
||||
LABEL edubuntu-32
|
||||
MENU LABEL Installa Edubuntu 32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed quiet
|
||||
|
||||
LABEL edubuntu-64
|
||||
MENU LABEL Installa Edubuntu 64 bit
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed quiet
|
||||
|
||||
LABEL edubuntu-32
|
||||
MENU LABEL Installa Edubuntu 32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed quiet
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return-edu
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
UI /utils/vesamenu.c32
|
||||
DEFAULT local
|
||||
TIMEOUT 30
|
||||
|
||||
MENU TITLE BgLUG PXE Boot
|
||||
MENU BACKGROUND /utils/bglug.png
|
||||
|
||||
LABEL local
|
||||
MENU LABEL Avvia dal primo disco locale
|
||||
KERNEL /utils/chain.c32
|
||||
APPEND hd0
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL client
|
||||
MENU LABEL Installa nuova macchina CLIENT
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/client-trusty.seed -- quiet
|
||||
|
||||
LABEL docenti
|
||||
MENU LABEL Installa nuova macchina DOCENTI
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/docenti-trusty.seed -- quiet
|
||||
|
||||
MENU SEPARATOR
|
||||
MENU BEGIN
|
||||
MENU TITLE !!! Development !!!
|
||||
LABEL client
|
||||
MENU LABEL Installa nuova macchina CLIENT - Spegni
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/dev/client-trusty.seed -- quiet
|
||||
|
||||
LABEL docenti
|
||||
MENU LABEL Installa nuova macchina DOCENTI - Spegni
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/dev/docenti-trusty.seed -- quiet
|
||||
|
||||
LABEL return-edu
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
MENU BEGIN
|
||||
MENU TITLE Edubuntu Classica
|
||||
|
||||
LABEL edubuntu-64
|
||||
MENU LABEL Installa Edubuntu 64 bit
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed quiet
|
||||
|
||||
LABEL edubuntu-32
|
||||
MENU LABEL Installa Edubuntu 32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed quiet
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return-edu
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
MENU BEGIN
|
||||
MENU TITLE Utilities
|
||||
|
||||
LABEL hdt
|
||||
MENU LABEL ^HDT - Hardware Diagnostic Tool
|
||||
KERNEL /utils/memdisk
|
||||
INITRD /utils/hdt.img
|
||||
APPEND floppy
|
||||
|
||||
LABEL memtest
|
||||
MENU LABEL ^memtest86 - Test della RAM
|
||||
KERNEL /utils/memtest86/vmlinuz
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
|
||||
MENU END
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
# Cambio nome interfacce
|
||||
|
||||
- name: Removing old interface names
|
||||
file:
|
||||
path: /etc/udev/rules.d/70-persistent-net.rules
|
||||
state: absent
|
||||
become: yes
|
||||
|
||||
- name: Forcing recreation of {{ extnic }}
|
||||
shell: "INTERFACE=eth0 MATCHADDR={{ ansible_eth0.macaddress }} INTERFACE_NAME={{ extnic }} /lib/udev/write_net_rules"
|
||||
become: yes
|
||||
|
||||
- name: Forcing recreation of {{ intnic }}
|
||||
shell: "INTERFACE=eth1 MATCHADDR={{ ansible_eth1.macaddress }} INTERFACE_NAME={{ intnic }} /lib/udev/write_net_rules"
|
||||
become: yes
|
||||
|
||||
- name: Pulizia vecchie interfacce
|
||||
shell: "/sbin/e-smith/db networks delete {{ item }}"
|
||||
become: yes
|
||||
with_items:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: Creo interfaccia esterna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ extnic }} ethernet bootproto dhcp device {{ extnic }} hwaddr {{ ansible_eth0.macaddress }} onboot yes peerdns yes role red
|
||||
become: yes
|
||||
|
||||
- name: Creo interfaccia interna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ intnic }} ethernet bootproto none device {{ intnic }} hwaddr {{ ansible_eth1.macaddress }} ipaddr 172.16.254.1 netmask 255.255.255.0 onboot yes role green
|
||||
become: yes
|
||||
|
||||
- name: Trigger interfaces configuration
|
||||
shell: "ifdown eth0; ifdown eth1; udevadm control --reload-rules && udevadm trigger; /sbin/e-smith/signal-event interface-update"
|
||||
become: yes
|
|
@ -4,4 +4,4 @@
|
|||
yum:
|
||||
name: libselinux-python
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
|
@ -0,0 +1,5 @@
|
|||
[bglug]
|
||||
name=NethServer BgLUG repo
|
||||
baseurl=http://repo.bglug.it/nethserver/
|
||||
enabled=1
|
||||
gpgcheck=0
|
|
@ -1,5 +0,0 @@
|
|||
[sys42]
|
||||
name=NethServer sys42.eu repo
|
||||
baseurl=http://bglug.sys42.eu/nethserver/
|
||||
enabled=1
|
||||
gpgcheck=0
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
- name: ntp save
|
||||
shell: /sbin/e-smith/signal-event nethserver-ntp-save
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
||||
- name: password-policy-update
|
||||
shell: /sbin/e-smith/signal-event password-policy-update
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
|
|
@ -2,19 +2,28 @@
|
|||
|
||||
- name: Verifica installazione git
|
||||
yum: name=git state=present
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags: git
|
||||
|
||||
- name: Verifica installazione ansible
|
||||
yum: name=ansible state=present
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags: ansible
|
||||
|
||||
- name: Checking for python-argparse
|
||||
shell: rpm -q python-argparse
|
||||
become: yes
|
||||
register: check_argparse
|
||||
ignore_errors: yes
|
||||
changed_when: "check_argparse.rc == 1"
|
||||
tags: ansible
|
||||
|
||||
- name: Installazione python-argparse
|
||||
shell:
|
||||
name: "ftp://fr2.rpmfind.net/linux/centos/6.7/extras/i386/Packages/python-argparse-1.2.1-2.el6.centos.noarch.rpm"
|
||||
yum:
|
||||
name: python-argparse
|
||||
state: present
|
||||
sudo: yes
|
||||
become: yes
|
||||
when: check_argparse is changed
|
||||
tags: ansible
|
||||
|
||||
#- name: Download della gestione client con ansible
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
- name: Installo epel-release
|
||||
yum: name=epel-release state=present
|
||||
sudo: yes
|
||||
when: check_epel|failed
|
||||
become: yes
|
||||
when: check_epel is failed
|
||||
register: epel_installed
|
||||
ignore_errors: yes
|
||||
|
||||
|
@ -17,37 +17,30 @@
|
|||
yum:
|
||||
name: "http://dl.fedoraproject.org/pub/epel/6/{{ ansible_architecture }}/epel-release-6-8.noarch.rpm"
|
||||
state: present
|
||||
sudo: yes
|
||||
when: epel_installed|failed
|
||||
become: yes
|
||||
when: epel_installed is failed
|
||||
register: rpm_epel_installed
|
||||
|
||||
- name: Abilito il repo EPEL
|
||||
shell: yum-config-manager --enable epel
|
||||
sudo: yes
|
||||
when: epel_installed|changed or epel_installed|success or rpm_epel_installed|changed
|
||||
become: yes
|
||||
when: epel_installed is changed or epel_installed is succeeded or rpm_epel_installed is changed
|
||||
changed_when: "'[epel]' in epel_enabled.stdout and epel_enabled.rc == 0"
|
||||
register: epel_enabled
|
||||
|
||||
- name: Pulizia e ricaricam. repo
|
||||
shell: yum clean all && yum repolist
|
||||
sudo: yes
|
||||
when: epel_enabled|changed
|
||||
become: yes
|
||||
when: epel_enabled is changed
|
||||
tags: repo
|
||||
|
||||
- name: Aggiorno il sistema
|
||||
yum: name=* state=latest
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags: upgrade
|
||||
|
||||
- name: Installo pacchetti addizionali
|
||||
yum: name={{ item }} state=present
|
||||
sudo: yes
|
||||
with_items: addin_pkgs
|
||||
yum: name='{{ item }}' state=present
|
||||
become: yes
|
||||
with_items: '{{ addin_pkgs }}'
|
||||
tags: pkg
|
||||
|
||||
# Fix per un problema con uno script di Nethserver
|
||||
- name: Installo l'ultima versione di perl-Authen-SASL
|
||||
yum:
|
||||
name: "http://rpm.mag-sol.com/Centos/6/{{ ansible_architecture }}/perl-Authen-SASL-2.16-1.el6.noarch.rpm"
|
||||
state: present
|
||||
sudo: yes
|
||||
|
|
|
@ -8,16 +8,11 @@
|
|||
name: yum-plugin-versionlock
|
||||
state: present
|
||||
|
||||
- name: Updating nethserver-release to last known version for 6.6
|
||||
yum:
|
||||
name: nethserver-release-6.6
|
||||
state: present
|
||||
|
||||
- name: Checking if already locked
|
||||
shell: yum versionlock list | grep -q nethserver-release && echo 'Locked' || true
|
||||
register: chk_locked_nethrelease
|
||||
changed_when: "'Locked' not in chk_locked_nethrelease.stdout"
|
||||
|
||||
- name: Locking nethserver-release version to 6.6
|
||||
- name: Locking nethserver-release version
|
||||
shell: yum versionlock add nethserver-release
|
||||
when: chk_locked_nethrelease|changed
|
||||
when: chk_locked_nethrelease is changed
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
tags: ssh
|
||||
|
||||
- include: lock-nethrelease.yml
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags: lock-nethrelease
|
||||
|
||||
- include: centos_pkgs.yml
|
||||
|
@ -12,7 +12,7 @@
|
|||
tags: centos
|
||||
|
||||
- include: pvtrepo.yml
|
||||
tags: sys42.eu
|
||||
tags: bglug
|
||||
|
||||
- include: ansible.yml
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
- name: Installazione istruzioni per repo sys42.eu
|
||||
- name: Installazione istruzioni per repo.bglug.it
|
||||
copy:
|
||||
src: sys42.repo
|
||||
dest: /etc/yum.repos.d/sys42.repo
|
||||
sudo: yes
|
||||
src: bglug.repo
|
||||
dest: /etc/yum.repos.d/bglug.repo
|
||||
become: yes
|
||||
|
||||
- name: Ricalcolo repository disponibili
|
||||
shell: yum repolist
|
||||
sudo: yes
|
||||
become: yes
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
- name: Creazione directory .ssh
|
||||
shell: mkdir -p $HOME/.ssh
|
||||
when: check_sshdir|failed
|
||||
when: check_sshdir is failed
|
||||
|
||||
- name: Verifica chiave ssh
|
||||
shell: test -f $HOME/.ssh/id_rsa
|
||||
|
@ -17,4 +17,4 @@
|
|||
|
||||
- name: Gestione creazione chiave ssh
|
||||
shell: ssh-keygen -t rsa -b 1024 -f $HOME/.ssh/id_rsa -N ''
|
||||
when: check_key|failed
|
||||
when: check_key is failed
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
---
|
||||
execmirrorpath: ""
|
||||
# Defaults for installation
|
||||
host: archive.ubuntu.com
|
||||
path: /ubuntu
|
||||
shost: security.ubuntu.com
|
||||
spath: /ubuntu
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
############# config ##################
|
||||
#
|
||||
# set base_path /var/spool/apt-mirror
|
||||
#
|
||||
# set mirror_path $base_path/mirror
|
||||
# set skel_path $base_path/skel
|
||||
# set var_path $base_path/var
|
||||
# set cleanscript $var_path/clean.sh
|
||||
# set defaultarch <running host architecture>
|
||||
# set postmirror_script $var_path/postmirror.sh
|
||||
# set run_postmirror 0
|
||||
set nthreads 20
|
||||
set _tilde 0
|
||||
#set limit_rate 200k
|
||||
#
|
||||
############# end config ##############
|
||||
|
||||
#
|
||||
# 14.04 LTS - Trusty Tahr
|
||||
#
|
||||
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://archive.ubuntu.com/ubuntu trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
|
||||
deb-i386 http://extras.ubuntu.com/ubuntu trusty main
|
||||
deb-amd64 http://extras.ubuntu.com/ubuntu trusty main
|
||||
deb-src http://extras.ubuntu.com/ubuntu trusty main
|
||||
|
||||
deb-i386 http://archive.canonical.com/ trusty partner
|
||||
deb-i386 http://archive.canonical.com/ trusty-proposed partner
|
||||
|
||||
deb-amd64 http://archive.canonical.com/ trusty partner
|
||||
deb-amd64 http://archive.canonical.com/ trusty-proposed partner
|
||||
|
||||
deb-i386 http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
||||
deb-i386 http://security.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
||||
deb-amd64 http://security.ubuntu.com/ubuntu trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
|
||||
|
||||
# Ansible
|
||||
deb-i386 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
|
||||
# LibreOffice PPA
|
||||
deb-i386 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
|
||||
# sys42
|
||||
deb-i386 http://bglug.sys42.eu/ubuntu trusty main
|
||||
deb-amd64 http://bglug.sys42.eu/ubuntu trusty main
|
||||
deb-src http://bglug.sys42.eu/ubuntu trusty main
|
||||
|
||||
clean http://archive.ubuntu.com/ubuntu
|
||||
clean http://extras.ubuntu.com/ubuntu
|
||||
clean http://archive.canonical.com
|
||||
clean http://security.ubuntu.com/ubuntu
|
||||
clean http://ppa.launchpad.net/ansible/ansible/ubuntu
|
||||
clean http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu
|
||||
clean http://bglug.sys42.eu/ubuntu
|
|
@ -2,17 +2,27 @@
|
|||
# Configurazione del server come repo
|
||||
|
||||
- name: Installazione apt-mirror
|
||||
yum: pkg=apt-mirror state=present
|
||||
sudo: yes
|
||||
yum:
|
||||
pkg: apt-mirror
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- name: Installazione configurazione apt-mirror
|
||||
copy: src=apt-mirror.list dest=/etc/apt-mirror.list
|
||||
sudo: yes
|
||||
template:
|
||||
src: apt-mirror.list
|
||||
dest: /etc/apt-mirror.list
|
||||
become: yes
|
||||
|
||||
- name: Installazione cron per sincronizzazione notturna
|
||||
copy: src=apt-mirror-cron dest=/etc/cron.daily/apt-mirror mode=0755
|
||||
sudo: yes
|
||||
copy:
|
||||
src: apt-mirror-cron
|
||||
dest: /etc/cron.daily/apt-mirror
|
||||
mode: 0755
|
||||
become: yes
|
||||
|
||||
- name: Installazione logrotate per sincronizzazione notturna
|
||||
copy: src=apt-mirror-logrotate dest=/etc/logrotate.d/apt-mirror mode=0644
|
||||
sudo: yes
|
||||
copy:
|
||||
src: apt-mirror-logrotate
|
||||
dest: /etc/logrotate.d/apt-mirror
|
||||
mode: 0644
|
||||
become: yes
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
|
||||
- name: Configuring executive mirrorpath
|
||||
set_fact:
|
||||
execmirrorpath: "{{ ansible_local.domain.mirrorpath }}"
|
||||
when: ansible_local.domain.mirror_mode == 'local' or ansible_local.domain.mirror_mode == 'nfs'
|
||||
- include: mirror-cfg.yml
|
||||
tags:
|
||||
- mirror
|
||||
|
||||
- include: local-mirror.yml
|
||||
when: ansible_local.domain.mirror_mode == 'local'
|
||||
|
@ -13,14 +12,14 @@
|
|||
|
||||
- include: nfs-mirror.yml
|
||||
when: ansible_local.domain.mirror_mode == 'nfs'
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags:
|
||||
- mirror
|
||||
- nfs-mirror
|
||||
|
||||
- include: remote-mirror.yml
|
||||
when: ansible_local.domain.mirror_mode == 'remote'
|
||||
sudo: yes
|
||||
become: yes
|
||||
tags:
|
||||
- mirror
|
||||
- remote-mirror
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
# Determining other variables to be used inside templates
|
||||
|
||||
- name: Determining mirror_host
|
||||
set_fact: host="{{ ansible_local.domain.mirror_host }}"
|
||||
when: ansible_local.domain.mirror_host is defined
|
||||
|
||||
- name: Determining mirror_path
|
||||
set_fact: path="{{ ansible_local.domain.mirror_path }}"
|
||||
when: ansible_local.domain.mirror_path is defined
|
||||
|
||||
- name: Determining mirror_security_host
|
||||
set_fact: shost="{{ ansible_local.domain.mirror_security_host }}"
|
||||
when: ansible_local.domain.mirror_security_host is defined
|
||||
|
||||
- name: Determining mirror_security_path
|
||||
set_fact: spath="{{ ansible_local.domain.mirror_security_path }}"
|
||||
when: ansible_local.domain.mirror_security_path is defined
|
|
@ -23,14 +23,14 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
when: chk_mount_nfs|changed
|
||||
when: chk_mount_nfs is changed
|
||||
|
||||
- name: Adding mountpoint to fstab
|
||||
lineinfile:
|
||||
dest: /etc/fstab
|
||||
line: "{{ ansible_local.domain.mirror_nfs_share }} /var/spool/apt-mirror/mirror nfs4 defaults 0 0"
|
||||
when: chk_mount_nfs|changed
|
||||
when: chk_mount_nfs is changed
|
||||
|
||||
- name: Mounting share
|
||||
shell: mount /var/spool/apt-mirror/mirror
|
||||
when: chk_mount_nfs|changed
|
||||
when: chk_mount_nfs is changed
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
---
|
||||
# Managing a remote mirror - Doing nothing ;)
|
||||
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
############# config ##################
|
||||
#
|
||||
# set base_path /var/spool/apt-mirror
|
||||
#
|
||||
# set path $base_path/mirror
|
||||
# set skel_path $base_path/skel
|
||||
# set var_path $base_path/var
|
||||
# set cleanscript $var_path/clean.sh
|
||||
# set defaultarch <running host architecture>
|
||||
# set postmirror_script $var_path/postmirror.sh
|
||||
# set run_postmirror 0
|
||||
set nthreads 20
|
||||
set _tilde 0
|
||||
#set limit_rate 200k
|
||||
#
|
||||
############# end config ##############
|
||||
|
||||
#
|
||||
# 14.04 LTS - Trusty Tahr
|
||||
#
|
||||
|
||||
deb-i386 http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-src http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-i386 http://{{ host }}{{ path }} trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
|
||||
deb-i386 http://extras.ubuntu.com/ubuntu trusty main
|
||||
deb-amd64 http://extras.ubuntu.com/ubuntu trusty main
|
||||
deb-src http://extras.ubuntu.com/ubuntu trusty main
|
||||
|
||||
deb-i386 http://archive.canonical.com/ trusty partner
|
||||
|
||||
deb-amd64 http://archive.canonical.com/ trusty partner
|
||||
|
||||
deb-i386 http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||
deb-i386 http://{{ shost }}{{ spath }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||
deb-amd64 http://{{ shost }}{{ spath }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-src http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||
|
||||
# Ansible
|
||||
deb-i386 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
|
||||
# LibreOffice PPA
|
||||
deb-i386 http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
|
||||
# Epoptes stable
|
||||
deb-i386 http://ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
|
||||
# Geogebra Official repository
|
||||
deb-i386 http://www.geogebra.net/linux stable main
|
||||
deb-amd64 http://www.geogebra.net/linux stable main
|
||||
deb-src http://www.geogebra.net/linux stable main
|
||||
|
||||
# BgLUG
|
||||
deb-i386 http://repo.bglug.it/ubuntu trusty main
|
||||
deb-amd64 http://repo.bglug.it/ubuntu trusty main
|
||||
deb-src http://repo.bglug.it/ubuntu trusty main
|
||||
|
||||
clean http://{{ host }}{{ path }}
|
||||
clean http://extras.ubuntu.com/ubuntu
|
||||
clean http://archive.canonical.com
|
||||
clean http://{{ shost }}{{ spath }}
|
||||
clean http://ppa.launchpad.net/ansible/ansible/ubuntu
|
||||
clean http://ppa.launchpad.net/libreoffice/ppa/ubuntu
|
||||
clean http://ppa.launchpad.net/epoptes/ppa/ubuntu
|
||||
clean http://www.geogebra.net/linux
|
||||
clean http://repo.bglug.it/ubuntu
|
|
@ -1,3 +0,0 @@
|
|||
# Generated by Vagrant
|
||||
[vagrant]
|
||||
NethServer ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant
|
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
# Cambio nome interfacce
|
||||
- name: Rinomino interfaccia esterna
|
||||
replace:
|
||||
dest: /etc/udev/rules.d/70-persistent-net.rules
|
||||
regexp: 'eth0'
|
||||
replace: '{{ extnic }}'
|
||||
sudo: yes
|
||||
|
||||
- name: Creo interfaccia esterna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ extnic }} ethernet bootproto dhcp device {{ extnic }} hwaddr {{ ansible_eth0.macaddress }} onboot yes role red
|
||||
sudo: yes
|
||||
|
||||
- name: Pulizia vecchia interfaccia esterna
|
||||
shell: /sbin/e-smith/db networks delete eth0
|
||||
sudo: yes
|
||||
|
||||
- name: Rinomino interfaccia interna
|
||||
replace:
|
||||
dest: /etc/udev/rules.d/70-persistent-net.rules
|
||||
regexp: 'eth1'
|
||||
replace: '{{ intnic }}'
|
||||
sudo: yes
|
||||
|
||||
- name: Creo interfaccia interna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ intnic }} ethernet bootproto none device {{ intnic }} hwaddr {{ ansible_eth1.macaddress }} ipaddr 192.168.1.1 netmask 255.255.255.0 onboot yes role green
|
||||
sudo: yes
|
||||
|
||||
- name: Pulizia vecchia interfaccia interna
|
||||
shell: /sbin/e-smith/db networks delete eth1
|
||||
sudo: yes
|
||||
|
||||
# Forzo il processo a tornare zero, altrimenti non va.
|
||||
- name: Ricreo le interfacce
|
||||
shell: udevadm control --reload-rules && udevadm trigger --attr-match=subsystem=net
|
||||
sudo: yes
|
||||
|
||||
- name: Segnalo il cambiamento a livello di interfacce
|
||||
shell: /sbin/e-smith/signal-event interface-update
|
||||
sudo: yes
|
Loading…
Reference in New Issue