Compare commits
1
Commits
master
..
574235e4cf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
574235e4cf |
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
.*.swp
|
# ---> Ansible
|
||||||
*.retry
|
*.retry
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,604 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright © 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>.
|
||||||
@@ -1,19 +1,3 @@
|
|||||||
# Requirements:
|
# cobald-testenv
|
||||||
CentOS 7 vm equipped with 2 CPU cores and 2 disks: one main disk containing OS
|
|
||||||
and an additional virtio disk containing docker images. Typically choose 5GB
|
|
||||||
for size of each disk.
|
|
||||||
|
|
||||||
# Tags
|
WIP. htcondor, slurm and cobald/tardis test environment
|
||||||
- htcondor, singularity, docker, slurm
|
|
||||||
- htcondor-containered, slurm-config
|
|
||||||
|
|
||||||
Just update slurm config using --tags slurm-config.
|
|
||||||
Full setup of just slurm using --skip-tags htcondor,singularity
|
|
||||||
|
|
||||||
# Example: Setup SLURM
|
|
||||||
First adjust inv.yml to you needs, specifying the hostname of your VM. Run:
|
|
||||||
|
|
||||||
ansible-playbook -i inv.yml --skip-tags htcondor,singularity play.yml
|
|
||||||
|
|
||||||
Configuration goes into ```/container/volumes/slurm/slurm.conf``` generated
|
|
||||||
from ```roles/slurm/templates/slurm.conf.j2```.
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
all:
|
|
||||||
hosts:
|
|
||||||
ed-c7-1:
|
|
||||||
ansible_user: root
|
|
||||||
ansible_host: ed-c7-1.virt.magni.thoto.net
|
|
||||||
ssh_args: -o ControlMaster=auto -o ControlPersist=60s
|
|
||||||
# ansible_host: 192.168.122.139
|
|
||||||
unpriv_user: thoto
|
|
||||||
children:
|
|
||||||
htcondor:
|
|
||||||
hosts:
|
|
||||||
ed-c7-1:
|
|
||||||
slurm:
|
|
||||||
hosts:
|
|
||||||
ed-c7-1:
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: all
|
|
||||||
tasks:
|
|
||||||
- name: "install tools"
|
|
||||||
yum:
|
|
||||||
name: [ vim-enhanced, htop, screen, bind-utils, nmap-ncat, net-tools ]
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- hosts: htcondor
|
|
||||||
pre_tasks:
|
|
||||||
- name: "install htcondor repo"
|
|
||||||
yum:
|
|
||||||
name: https://research.cs.wisc.edu/htcondor/repo/8.9/htcondor-release-current.el7.noarch.rpm
|
|
||||||
state: present
|
|
||||||
tags: htcondor
|
|
||||||
|
|
||||||
- name: "install htcondor software "
|
|
||||||
yum:
|
|
||||||
name: htcondor-ce
|
|
||||||
state: present
|
|
||||||
tags: htcondor
|
|
||||||
|
|
||||||
- name: "remove minicondor configuration"
|
|
||||||
yum:
|
|
||||||
name: minicondor
|
|
||||||
state: absent
|
|
||||||
tags: htcondor
|
|
||||||
|
|
||||||
- name: "setup singularity"
|
|
||||||
import_tasks: "singularity.yml"
|
|
||||||
tags: singularity
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- name: "setup docker"
|
|
||||||
role: docker
|
|
||||||
tags: docker
|
|
||||||
|
|
||||||
- name: "setup htcondor test environment in docker containers"
|
|
||||||
role: docker-htcondor
|
|
||||||
tags:
|
|
||||||
- htcondor-containered
|
|
||||||
- htcondor
|
|
||||||
|
|
||||||
- hosts: slurm
|
|
||||||
vars:
|
|
||||||
container_privileged: True
|
|
||||||
num_nodes: 3
|
|
||||||
roles:
|
|
||||||
- name: "setup docker"
|
|
||||||
role: docker
|
|
||||||
tags: docker
|
|
||||||
- name: "setup slurm test environment in docker containers"
|
|
||||||
role: slurm
|
|
||||||
vars:
|
|
||||||
slurm_user: slurm # or root
|
|
||||||
tags: slurm
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
use ROLE:centralmanager
|
|
||||||
# ALLOW_WRITE per default on * -> following has no effect yet
|
|
||||||
ALLOW_WRITE_COLLECTOR=$(ALLOW_WRITE) condor-exec.htc.local condor-sub.htc.local
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
######################################################################
|
|
||||||
##
|
|
||||||
## condor_config
|
|
||||||
##
|
|
||||||
## This is the global configuration file for condor. This is where
|
|
||||||
## you define where the local config file is. Any settings
|
|
||||||
## made here may potentially be overridden in the local configuration
|
|
||||||
## file. KEEP THAT IN MIND! To double-check that a variable is
|
|
||||||
## getting set from the configuration file that you expect, use
|
|
||||||
## condor_config_val -v <variable name>
|
|
||||||
##
|
|
||||||
## condor_config.annotated is a more detailed sample config file
|
|
||||||
##
|
|
||||||
## Unless otherwise specified, settings that are commented out show
|
|
||||||
## the defaults that are used if you don't define a value. Settings
|
|
||||||
## that are defined here MUST BE DEFINED since they have no default
|
|
||||||
## value.
|
|
||||||
##
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
## Where have you installed the bin, sbin and lib condor directories?
|
|
||||||
RELEASE_DIR = /usr
|
|
||||||
|
|
||||||
## Where is the local condor directory for each host? This is where the local config file(s), logs and
|
|
||||||
## spool/execute directories are located. this is the default for Linux and Unix systems.
|
|
||||||
LOCAL_DIR = /var
|
|
||||||
|
|
||||||
## Where is the machine-specific local config file for each host?
|
|
||||||
# LOCAL_CONFIG_FILE = /etc/condor/condor_config.local
|
|
||||||
LOCAL_CONFIG_FILE = /etc/condor/condor_config_$(HOSTNAME).local
|
|
||||||
## If your configuration is on a shared file system, then this might be a better default
|
|
||||||
#LOCAL_CONFIG_FILE = $(RELEASE_DIR)/etc/$(HOSTNAME).local
|
|
||||||
## If the local config file is not present, is it an error? (WARNING: This is a potential security issue.)
|
|
||||||
REQUIRE_LOCAL_CONFIG_FILE = false
|
|
||||||
|
|
||||||
## The normal way to do configuration with RPMs is to read all of the
|
|
||||||
## files in a given directory that don't match a regex as configuration files.
|
|
||||||
## Config files are read in lexicographic order.
|
|
||||||
LOCAL_CONFIG_DIR = /etc/condor/config.d
|
|
||||||
#LOCAL_CONFIG_DIR_EXCLUDE_REGEXP = ^((\..*)|(.*~)|(#.*)|(.*\.rpmsave)|(.*\.rpmnew))$
|
|
||||||
|
|
||||||
##
|
|
||||||
## Do NOT use host-based security by default.
|
|
||||||
##
|
|
||||||
## This was the default for the 8.8 series (and earlier), but it is
|
|
||||||
## intrinsically insecure. To make the 9.0 series secure by default, we
|
|
||||||
## commented it out.
|
|
||||||
##
|
|
||||||
## You should seriously consider improving your security configuration.
|
|
||||||
##
|
|
||||||
## To continue to use your old security configuration, knowing that it is
|
|
||||||
## insecure, add the line 'use SECURITY : HOST_BASED' to your local
|
|
||||||
## configuration directory. Don't just uncomment the final line in this
|
|
||||||
## comment block; changes in this file may be lost during your next upgrade.
|
|
||||||
## The following shell command will make the change on most Linux systems.
|
|
||||||
##
|
|
||||||
## echo 'use SECURITY : HOST_BASED' >> $(condor_config_val LOCAL_CONFIG_DIR)/00-insecure.config
|
|
||||||
##
|
|
||||||
|
|
||||||
## To expand your condor pool beyond a single host, set ALLOW_WRITE to match all of the hosts
|
|
||||||
#ALLOW_WRITE = *.cs.wisc.edu
|
|
||||||
## FLOCK_FROM defines the machines that grant access to your pool via flocking. (i.e. these machines can join your pool).
|
|
||||||
#FLOCK_FROM =
|
|
||||||
## FLOCK_TO defines the central managers that your schedd will advertise itself to (i.e. these pools will give matches to your schedd).
|
|
||||||
#FLOCK_TO = condor.cs.wisc.edu, cm.example.edu
|
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Values set by the rpm patch script:
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
|
|
||||||
## For Unix machines, the path and file name of the file containing
|
|
||||||
## the pool password for password authentication.
|
|
||||||
#SEC_PASSWORD_FILE = $(LOCAL_DIR)/lib/condor/pool_password
|
|
||||||
|
|
||||||
## Pathnames
|
|
||||||
RUN = $(LOCAL_DIR)/run/condor
|
|
||||||
LOG = $(LOCAL_DIR)/log/condor
|
|
||||||
LOCK = $(LOCAL_DIR)/lock/condor
|
|
||||||
SPOOL = $(LOCAL_DIR)/lib/condor/spool
|
|
||||||
EXECUTE = $(LOCAL_DIR)/lib/condor/execute
|
|
||||||
BIN = $(RELEASE_DIR)/bin
|
|
||||||
LIB = $(RELEASE_DIR)/lib64/condor
|
|
||||||
INCLUDE = $(RELEASE_DIR)/include/condor
|
|
||||||
SBIN = $(RELEASE_DIR)/sbin
|
|
||||||
LIBEXEC = $(RELEASE_DIR)/libexec/condor
|
|
||||||
SHARE = $(RELEASE_DIR)/share/condor
|
|
||||||
|
|
||||||
PROCD_ADDRESS = $(RUN)/procd_pipe
|
|
||||||
|
|
||||||
JAVA_CLASSPATH_DEFAULT = $(SHARE) .
|
|
||||||
|
|
||||||
## Install the minicondor package to run HTCondor on a single node
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
|
|
||||||
HostKey _INSERT_HOST_KEY_
|
|
||||||
AuthorizedKeysFile _INSERT_AUTHORIZED_KEYS_FILE_
|
|
||||||
|
|
||||||
# The following option is not supported by all recent versions of OpenSSH,
|
|
||||||
# so instead we rely on injection of the shell setup command in the authorized
|
|
||||||
# keys file.
|
|
||||||
#ForceCommand _INSERT_FORCE_COMMAND_
|
|
||||||
|
|
||||||
# as a convenience to users, allow remote setting of environment
|
|
||||||
# since sshd is running as the job uid, there isn't really a security concern
|
|
||||||
AcceptEnv *
|
|
||||||
|
|
||||||
Subsystem sftp /usr/libexec/openssh/sftp-server
|
|
||||||
|
|
||||||
# prevent sshd from freaking out about reading files from inside
|
|
||||||
# a tmp-like directory
|
|
||||||
StrictModes no
|
|
||||||
|
|
||||||
# Rejection by tcp wrappers is not logged at INFO or VERBOSE log levels,
|
|
||||||
# so to make diagnosis of problems easier, we use DEBUG.
|
|
||||||
LogLevel DEBUG
|
|
||||||
|
|
||||||
X11Forwarding yes
|
|
||||||
|
|
||||||
# By default, OpenSSH uses the ipv6 loopback even if ipv6 is disabled in the
|
|
||||||
# kernel. This forces OpenSSH to use the "local" network instead
|
|
||||||
X11UseLocalhost no
|
|
||||||
|
|
||||||
# The following settings are recommended for good security.
|
|
||||||
# In particular, only FIPS 140-2 algorithms are used.
|
|
||||||
# URLs for extra information re FIPS security compliance:
|
|
||||||
# https://rhel7stig.readthedocs.io/en/latest/
|
|
||||||
# https://www.stigviewer.com/stig/red_hat_enterprise_linux_7/
|
|
||||||
# https://people.redhat.com/swells/scap-security-guide/tables/table-rhel7-stig-manual.html
|
|
||||||
|
|
||||||
#-FIPS High Severity
|
|
||||||
Protocol 2
|
|
||||||
PermitEmptyPasswords no
|
|
||||||
|
|
||||||
#-FIPS Medium Severity
|
|
||||||
# Note: Ciphers and MACs below will be incompatible with RHEL5 or earlier.
|
|
||||||
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
|
|
||||||
MACs hmac-sha2-256,hmac-sha2-512
|
|
||||||
PermitRootLogin no
|
|
||||||
PermitUserEnvironment no
|
|
||||||
GSSAPIAuthentication no
|
|
||||||
KerberosAuthentication no
|
|
||||||
HostbasedAuthentication no
|
|
||||||
IgnoreRhosts yes
|
|
||||||
IgnoreUserKnownHosts yes
|
|
||||||
PrintLastLog yes
|
|
||||||
UsePrivilegeSeparation sandbox
|
|
||||||
Compression delayed
|
|
||||||
|
|
||||||
#-Recommended for security, but left out ssh_to_job config
|
|
||||||
# because they provide minimal value and are likely to annoy
|
|
||||||
# users or generate needless warnings in the ssh_to_job setting.
|
|
||||||
#
|
|
||||||
# ClientAliveInterval 600 # Note: condor_submit -i sets TMOUT
|
|
||||||
# ClientAliveCountMax 0
|
|
||||||
# banner=/etc/issue # Set to your warning banner
|
|
||||||
# StrictModes yes # Can't set due to tmp-like directory
|
|
||||||
# RhostsRSAAuthentication no # Obsolete Protocol version 1 option
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
##
|
|
||||||
## Default security settings
|
|
||||||
##
|
|
||||||
## Host-based security was the default for the 8.8 series (and earlier).
|
|
||||||
##
|
|
||||||
## Host-based security assumes that all users on a machine are trusted.
|
|
||||||
## For example, if host-based security trusts that a given machine can
|
|
||||||
## run jobs, then any user who can start a process on that machine can
|
|
||||||
## start a startd that can "steal" jobs from the system.
|
|
||||||
#
|
|
||||||
## To help make HTCondor secure by default, we removed host-based security
|
|
||||||
## from the default configuration file
|
|
||||||
## (/etc/condor/condor_config).
|
|
||||||
##
|
|
||||||
## New installations of HTCondor should be made using the get_htcondor tool,
|
|
||||||
## which can automatically establish IDTOKENS-based security across a multi-
|
|
||||||
## node pool. For existing installations, we recommend you
|
|
||||||
## consider improving your security configuration.
|
|
||||||
##
|
|
||||||
## To continue to use your old security configuration,
|
|
||||||
## comment out the 'recommended' line below, and uncomment the
|
|
||||||
## 'host_based' line.
|
|
||||||
##
|
|
||||||
|
|
||||||
# use security : host_based
|
|
||||||
use security : recommended_v9_0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CONDOR_HOST = condor-cm.htc.local
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
|||||||
use ROLE:execute
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
use ROLE:submit
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
FROM docker.io/library/centos:7
|
|
||||||
|
|
||||||
RUN yum install -y https://research.cs.wisc.edu/htcondor/repo/8.9/htcondor-release-current.el7.noarch.rpm && \
|
|
||||||
yum install --nogpgcheck -y condor && \
|
|
||||||
yum install -y less && \
|
|
||||||
yum clean all
|
|
||||||
|
|
||||||
RUN yum install -y iproute bind-utils nmap-ncat net-tools && \
|
|
||||||
yum clean all
|
|
||||||
|
|
||||||
CMD bash -c 'cat <({ condor_master -f & tail --retry --pid $! -f /var/log/condor/MasterLog & })'
|
|
||||||
@@ -1,793 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
|
||||||
# Copyright: (c) 2017, Ansible Project
|
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
||||||
|
|
||||||
from __future__ import absolute_import, division, print_function
|
|
||||||
__metaclass__ = type
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|
||||||
'status': ['stableinterface'],
|
|
||||||
'supported_by': 'core'}
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
|
||||||
---
|
|
||||||
module: copy
|
|
||||||
version_added: historical
|
|
||||||
short_description: Copy files to remote locations
|
|
||||||
description:
|
|
||||||
- The C(copy) module copies a file from the local or remote machine to a location on the remote machine.
|
|
||||||
- Use the M(fetch) module to copy files from remote locations to the local box.
|
|
||||||
- If you need variable interpolation in copied files, use the M(template) module. Using a variable in the C(content)
|
|
||||||
field will result in unpredictable output.
|
|
||||||
- For Windows targets, use the M(win_copy) module instead.
|
|
||||||
options:
|
|
||||||
src:
|
|
||||||
description:
|
|
||||||
- Local path to a file to copy to the remote server.
|
|
||||||
- This can be absolute or relative.
|
|
||||||
- If path is a directory, it is copied recursively. In this case, if path ends
|
|
||||||
with "/", only inside contents of that directory are copied to destination.
|
|
||||||
Otherwise, if it does not end with "/", the directory itself with all contents
|
|
||||||
is copied. This behavior is similar to the C(rsync) command line tool.
|
|
||||||
type: path
|
|
||||||
content:
|
|
||||||
description:
|
|
||||||
- When used instead of C(src), sets the contents of a file directly to the specified value.
|
|
||||||
- Works only when C(dest) is a file. Creates the file if it does not exist.
|
|
||||||
- For advanced formatting or if C(content) contains a variable, use the M(template) module.
|
|
||||||
type: str
|
|
||||||
version_added: '1.1'
|
|
||||||
dest:
|
|
||||||
description:
|
|
||||||
- Remote absolute path where the file should be copied to.
|
|
||||||
- If C(src) is a directory, this must be a directory too.
|
|
||||||
- If C(dest) is a non-existent path and if either C(dest) ends with "/" or C(src) is a directory, C(dest) is created.
|
|
||||||
- If I(dest) is a relative path, the starting directory is determined by the remote host.
|
|
||||||
- If C(src) and C(dest) are files, the parent directory of C(dest) is not created and the task fails if it does not already exist.
|
|
||||||
type: path
|
|
||||||
required: yes
|
|
||||||
backup:
|
|
||||||
description:
|
|
||||||
- Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
|
|
||||||
type: bool
|
|
||||||
default: no
|
|
||||||
version_added: '0.7'
|
|
||||||
force:
|
|
||||||
description:
|
|
||||||
- Influence whether the remote file must always be replaced.
|
|
||||||
- If C(yes), the remote file will be replaced when contents are different than the source.
|
|
||||||
- If C(no), the file will only be transferred if the destination does not exist.
|
|
||||||
- Alias C(thirsty) has been deprecated and will be removed in 2.13.
|
|
||||||
type: bool
|
|
||||||
default: yes
|
|
||||||
aliases: [ thirsty ]
|
|
||||||
version_added: '1.1'
|
|
||||||
mode:
|
|
||||||
description:
|
|
||||||
- The permissions of the destination file or directory.
|
|
||||||
- For those used to C(/usr/bin/chmod) remember that modes are actually octal numbers.
|
|
||||||
You must either add a leading zero so that Ansible's YAML parser knows it is an octal number
|
|
||||||
(like C(0644) or C(01777))or quote it (like C('644') or C('1777')) so Ansible receives a string
|
|
||||||
and can do its own conversion from string into number. Giving Ansible a number without following
|
|
||||||
one of these rules will end up with a decimal number which will have unexpected results.
|
|
||||||
- As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)).
|
|
||||||
- As of Ansible 2.3, the mode may also be the special string C(preserve).
|
|
||||||
- C(preserve) means that the file will be given the same permissions as the source file.
|
|
||||||
type: path
|
|
||||||
directory_mode:
|
|
||||||
description:
|
|
||||||
- When doing a recursive copy set the mode for the directories.
|
|
||||||
- If this is not set we will use the system defaults.
|
|
||||||
- The mode is only set on directories which are newly created, and will not affect those that already existed.
|
|
||||||
type: raw
|
|
||||||
version_added: '1.5'
|
|
||||||
remote_src:
|
|
||||||
description:
|
|
||||||
- Influence whether C(src) needs to be transferred or already is present remotely.
|
|
||||||
- If C(no), it will search for C(src) at originating/master machine.
|
|
||||||
- If C(yes) it will go to the remote/target machine for the C(src).
|
|
||||||
- C(remote_src) supports recursive copying as of version 2.8.
|
|
||||||
- C(remote_src) only works with C(mode=preserve) as of version 2.6.
|
|
||||||
type: bool
|
|
||||||
default: no
|
|
||||||
version_added: '2.0'
|
|
||||||
follow:
|
|
||||||
description:
|
|
||||||
- This flag indicates that filesystem links in the destination, if they exist, should be followed.
|
|
||||||
type: bool
|
|
||||||
default: no
|
|
||||||
version_added: '1.8'
|
|
||||||
local_follow:
|
|
||||||
description:
|
|
||||||
- This flag indicates that filesystem links in the source tree, if they exist, should be followed.
|
|
||||||
type: bool
|
|
||||||
default: yes
|
|
||||||
version_added: '2.4'
|
|
||||||
checksum:
|
|
||||||
description:
|
|
||||||
- SHA1 checksum of the file being transferred.
|
|
||||||
- Used to validate that the copy of the file was successful.
|
|
||||||
- If this is not provided, ansible will use the local calculated checksum of the src file.
|
|
||||||
type: str
|
|
||||||
version_added: '2.5'
|
|
||||||
extends_documentation_fragment:
|
|
||||||
- decrypt
|
|
||||||
- files
|
|
||||||
- validate
|
|
||||||
notes:
|
|
||||||
- The M(copy) module recursively copy facility does not scale to lots (>hundreds) of files.
|
|
||||||
seealso:
|
|
||||||
- module: assemble
|
|
||||||
- module: fetch
|
|
||||||
- module: file
|
|
||||||
- module: synchronize
|
|
||||||
- module: template
|
|
||||||
- module: win_copy
|
|
||||||
author:
|
|
||||||
- Ansible Core Team
|
|
||||||
- Michael DeHaan
|
|
||||||
'''
|
|
||||||
|
|
||||||
EXAMPLES = r'''
|
|
||||||
- name: Copy file with owner and permissions
|
|
||||||
copy:
|
|
||||||
src: /srv/myfiles/foo.conf
|
|
||||||
dest: /etc/foo.conf
|
|
||||||
owner: foo
|
|
||||||
group: foo
|
|
||||||
mode: '0644'
|
|
||||||
|
|
||||||
- name: Copy file with owner and permission, using symbolic representation
|
|
||||||
copy:
|
|
||||||
src: /srv/myfiles/foo.conf
|
|
||||||
dest: /etc/foo.conf
|
|
||||||
owner: foo
|
|
||||||
group: foo
|
|
||||||
mode: u=rw,g=r,o=r
|
|
||||||
|
|
||||||
- name: Another symbolic mode example, adding some permissions and removing others
|
|
||||||
copy:
|
|
||||||
src: /srv/myfiles/foo.conf
|
|
||||||
dest: /etc/foo.conf
|
|
||||||
owner: foo
|
|
||||||
group: foo
|
|
||||||
mode: u+rw,g-wx,o-rwx
|
|
||||||
|
|
||||||
- name: Copy a new "ntp.conf file into place, backing up the original if it differs from the copied version
|
|
||||||
copy:
|
|
||||||
src: /mine/ntp.conf
|
|
||||||
dest: /etc/ntp.conf
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: '0644'
|
|
||||||
backup: yes
|
|
||||||
|
|
||||||
- name: Copy a new "sudoers" file into place, after passing validation with visudo
|
|
||||||
copy:
|
|
||||||
src: /mine/sudoers
|
|
||||||
dest: /etc/sudoers
|
|
||||||
validate: /usr/sbin/visudo -csf %s
|
|
||||||
|
|
||||||
- name: Copy a "sudoers" file on the remote machine for editing
|
|
||||||
copy:
|
|
||||||
src: /etc/sudoers
|
|
||||||
dest: /etc/sudoers.edit
|
|
||||||
remote_src: yes
|
|
||||||
validate: /usr/sbin/visudo -csf %s
|
|
||||||
|
|
||||||
- name: Copy using inline content
|
|
||||||
copy:
|
|
||||||
content: '# This file was moved to /etc/other.conf'
|
|
||||||
dest: /etc/mine.conf
|
|
||||||
|
|
||||||
- name: If follow=yes, /path/to/file will be overwritten by contents of foo.conf
|
|
||||||
copy:
|
|
||||||
src: /etc/foo.conf
|
|
||||||
dest: /path/to/link # link to /path/to/file
|
|
||||||
follow: yes
|
|
||||||
|
|
||||||
- name: If follow=no, /path/to/link will become a file and be overwritten by contents of foo.conf
|
|
||||||
copy:
|
|
||||||
src: /etc/foo.conf
|
|
||||||
dest: /path/to/link # link to /path/to/file
|
|
||||||
follow: no
|
|
||||||
'''
|
|
||||||
|
|
||||||
RETURN = r'''
|
|
||||||
dest:
|
|
||||||
description: Destination file/path
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: /path/to/file.txt
|
|
||||||
src:
|
|
||||||
description: Source file used for the copy on the target machine
|
|
||||||
returned: changed
|
|
||||||
type: str
|
|
||||||
sample: /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source
|
|
||||||
md5sum:
|
|
||||||
description: MD5 checksum of the file after running copy
|
|
||||||
returned: when supported
|
|
||||||
type: str
|
|
||||||
sample: 2a5aeecc61dc98c4d780b14b330e3282
|
|
||||||
checksum:
|
|
||||||
description: SHA1 checksum of the file after running copy
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: 6e642bb8dd5c2e027bf21dd923337cbb4214f827
|
|
||||||
backup_file:
|
|
||||||
description: Name of backup file created
|
|
||||||
returned: changed and if backup=yes
|
|
||||||
type: str
|
|
||||||
sample: /path/to/file.txt.2015-02-12@22:09~
|
|
||||||
gid:
|
|
||||||
description: Group id of the file, after execution
|
|
||||||
returned: success
|
|
||||||
type: int
|
|
||||||
sample: 100
|
|
||||||
group:
|
|
||||||
description: Group of the file, after execution
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: httpd
|
|
||||||
owner:
|
|
||||||
description: Owner of the file, after execution
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: httpd
|
|
||||||
uid:
|
|
||||||
description: Owner id of the file, after execution
|
|
||||||
returned: success
|
|
||||||
type: int
|
|
||||||
sample: 100
|
|
||||||
mode:
|
|
||||||
description: Permissions of the target, after execution
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: 0644
|
|
||||||
size:
|
|
||||||
description: Size of the target, after execution
|
|
||||||
returned: success
|
|
||||||
type: int
|
|
||||||
sample: 1220
|
|
||||||
state:
|
|
||||||
description: State of the target, after execution
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: file
|
|
||||||
'''
|
|
||||||
|
|
||||||
import errno
|
|
||||||
import filecmp
|
|
||||||
import grp
|
|
||||||
import os
|
|
||||||
import os.path
|
|
||||||
import platform
|
|
||||||
import pwd
|
|
||||||
import shutil
|
|
||||||
import stat
|
|
||||||
import tempfile
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
|
||||||
from ansible.module_utils.common.process import get_bin_path
|
|
||||||
from ansible.module_utils._text import to_bytes, to_native
|
|
||||||
from ansible.module_utils.six import PY3
|
|
||||||
|
|
||||||
|
|
||||||
# The AnsibleModule object
|
|
||||||
module = None
|
|
||||||
|
|
||||||
|
|
||||||
class AnsibleModuleError(Exception):
|
|
||||||
def __init__(self, results):
|
|
||||||
self.results = results
|
|
||||||
|
|
||||||
|
|
||||||
# Once we get run_command moved into common, we can move this into a common/files module. We can't
|
|
||||||
# until then because of the module.run_command() method. We may need to move it into
|
|
||||||
# basic::AnsibleModule() until then but if so, make it a private function so that we don't have to
|
|
||||||
# keep it for backwards compatibility later.
|
|
||||||
def clear_facls(path):
|
|
||||||
setfacl = get_bin_path('setfacl', True)
|
|
||||||
# FIXME "setfacl -b" is available on Linux and FreeBSD. There is "setfacl -D e" on z/OS. Others?
|
|
||||||
acl_command = [setfacl, '-b', path]
|
|
||||||
b_acl_command = [to_bytes(x) for x in acl_command]
|
|
||||||
rc, out, err = module.run_command(b_acl_command, environ_update=dict(LANG='C', LC_ALL='C', LC_MESSAGES='C'))
|
|
||||||
if rc != 0:
|
|
||||||
raise RuntimeError('Error running "{0}": stdout: "{1}"; stderr: "{2}"'.format(' '.join(b_acl_command), out, err))
|
|
||||||
|
|
||||||
|
|
||||||
def split_pre_existing_dir(dirname):
|
|
||||||
'''
|
|
||||||
Return the first pre-existing directory and a list of the new directories that will be created.
|
|
||||||
'''
|
|
||||||
head, tail = os.path.split(dirname)
|
|
||||||
b_head = to_bytes(head, errors='surrogate_or_strict')
|
|
||||||
if head == '':
|
|
||||||
return ('.', [tail])
|
|
||||||
if not os.path.exists(b_head):
|
|
||||||
if head == '/':
|
|
||||||
raise AnsibleModuleError(results={'msg': "The '/' directory doesn't exist on this machine."})
|
|
||||||
(pre_existing_dir, new_directory_list) = split_pre_existing_dir(head)
|
|
||||||
else:
|
|
||||||
return (head, [tail])
|
|
||||||
new_directory_list.append(tail)
|
|
||||||
return (pre_existing_dir, new_directory_list)
|
|
||||||
|
|
||||||
|
|
||||||
def adjust_recursive_directory_permissions(pre_existing_dir, new_directory_list, module, directory_args, changed):
|
|
||||||
'''
|
|
||||||
Walk the new directories list and make sure that permissions are as we would expect
|
|
||||||
'''
|
|
||||||
|
|
||||||
if new_directory_list:
|
|
||||||
working_dir = os.path.join(pre_existing_dir, new_directory_list.pop(0))
|
|
||||||
directory_args['path'] = working_dir
|
|
||||||
changed = module.set_fs_attributes_if_different(directory_args, changed)
|
|
||||||
changed = adjust_recursive_directory_permissions(working_dir, new_directory_list, module, directory_args, changed)
|
|
||||||
return changed
|
|
||||||
|
|
||||||
|
|
||||||
def chown_recursive(path, module):
|
|
||||||
changed = False
|
|
||||||
owner = module.params['owner']
|
|
||||||
group = module.params['group']
|
|
||||||
|
|
||||||
if owner is not None:
|
|
||||||
if not module.check_mode:
|
|
||||||
for dirpath, dirnames, filenames in os.walk(path):
|
|
||||||
owner_changed = module.set_owner_if_different(dirpath, owner, False)
|
|
||||||
if owner_changed is True:
|
|
||||||
changed = owner_changed
|
|
||||||
for dir in [os.path.join(dirpath, d) for d in dirnames]:
|
|
||||||
owner_changed = module.set_owner_if_different(dir, owner, False)
|
|
||||||
if owner_changed is True:
|
|
||||||
changed = owner_changed
|
|
||||||
for file in [os.path.join(dirpath, f) for f in filenames]:
|
|
||||||
owner_changed = module.set_owner_if_different(file, owner, False)
|
|
||||||
if owner_changed is True:
|
|
||||||
changed = owner_changed
|
|
||||||
else:
|
|
||||||
uid = pwd.getpwnam(owner).pw_uid
|
|
||||||
for dirpath, dirnames, filenames in os.walk(path):
|
|
||||||
owner_changed = (os.stat(dirpath).st_uid != uid)
|
|
||||||
if owner_changed is True:
|
|
||||||
changed = owner_changed
|
|
||||||
for dir in [os.path.join(dirpath, d) for d in dirnames]:
|
|
||||||
owner_changed = (os.stat(dir).st_uid != uid)
|
|
||||||
if owner_changed is True:
|
|
||||||
changed = owner_changed
|
|
||||||
for file in [os.path.join(dirpath, f) for f in filenames]:
|
|
||||||
owner_changed = (os.stat(file).st_uid != uid)
|
|
||||||
if owner_changed is True:
|
|
||||||
changed = owner_changed
|
|
||||||
if group is not None:
|
|
||||||
if not module.check_mode:
|
|
||||||
for dirpath, dirnames, filenames in os.walk(path):
|
|
||||||
group_changed = module.set_group_if_different(dirpath, group, False)
|
|
||||||
if group_changed is True:
|
|
||||||
changed = group_changed
|
|
||||||
for dir in [os.path.join(dirpath, d) for d in dirnames]:
|
|
||||||
group_changed = module.set_group_if_different(dir, group, False)
|
|
||||||
if group_changed is True:
|
|
||||||
changed = group_changed
|
|
||||||
for file in [os.path.join(dirpath, f) for f in filenames]:
|
|
||||||
group_changed = module.set_group_if_different(file, group, False)
|
|
||||||
if group_changed is True:
|
|
||||||
changed = group_changed
|
|
||||||
else:
|
|
||||||
gid = grp.getgrnam(group).gr_gid
|
|
||||||
for dirpath, dirnames, filenames in os.walk(path):
|
|
||||||
group_changed = (os.stat(dirpath).st_gid != gid)
|
|
||||||
if group_changed is True:
|
|
||||||
changed = group_changed
|
|
||||||
for dir in [os.path.join(dirpath, d) for d in dirnames]:
|
|
||||||
group_changed = (os.stat(dir).st_gid != gid)
|
|
||||||
if group_changed is True:
|
|
||||||
changed = group_changed
|
|
||||||
for file in [os.path.join(dirpath, f) for f in filenames]:
|
|
||||||
group_changed = (os.stat(file).st_gid != gid)
|
|
||||||
if group_changed is True:
|
|
||||||
changed = group_changed
|
|
||||||
|
|
||||||
return changed
|
|
||||||
|
|
||||||
|
|
||||||
def copy_diff_files(src, dest, module):
|
|
||||||
changed = False
|
|
||||||
owner = module.params['owner']
|
|
||||||
group = module.params['group']
|
|
||||||
local_follow = module.params['local_follow']
|
|
||||||
diff_files = filecmp.dircmp(src, dest).diff_files
|
|
||||||
if len(diff_files):
|
|
||||||
changed = True
|
|
||||||
if not module.check_mode:
|
|
||||||
for item in diff_files:
|
|
||||||
src_item_path = os.path.join(src, item)
|
|
||||||
dest_item_path = os.path.join(dest, item)
|
|
||||||
b_src_item_path = to_bytes(src_item_path, errors='surrogate_or_strict')
|
|
||||||
b_dest_item_path = to_bytes(dest_item_path, errors='surrogate_or_strict')
|
|
||||||
if os.path.islink(b_src_item_path) and local_follow is False:
|
|
||||||
linkto = os.readlink(b_src_item_path)
|
|
||||||
os.symlink(linkto, b_dest_item_path)
|
|
||||||
else:
|
|
||||||
shutil.copyfile(b_src_item_path, b_dest_item_path)
|
|
||||||
shutil.copymode(b_src_item_path, b_dest_item_path)
|
|
||||||
|
|
||||||
if owner is not None:
|
|
||||||
module.set_owner_if_different(b_dest_item_path, owner, False)
|
|
||||||
if group is not None:
|
|
||||||
module.set_group_if_different(b_dest_item_path, group, False)
|
|
||||||
changed = True
|
|
||||||
return changed
|
|
||||||
|
|
||||||
|
|
||||||
def copy_left_only(src, dest, module):
|
|
||||||
changed = False
|
|
||||||
owner = module.params['owner']
|
|
||||||
group = module.params['group']
|
|
||||||
local_follow = module.params['local_follow']
|
|
||||||
left_only = filecmp.dircmp(src, dest).left_only
|
|
||||||
if len(left_only):
|
|
||||||
changed = True
|
|
||||||
if not module.check_mode:
|
|
||||||
for item in left_only:
|
|
||||||
src_item_path = os.path.join(src, item)
|
|
||||||
dest_item_path = os.path.join(dest, item)
|
|
||||||
b_src_item_path = to_bytes(src_item_path, errors='surrogate_or_strict')
|
|
||||||
b_dest_item_path = to_bytes(dest_item_path, errors='surrogate_or_strict')
|
|
||||||
|
|
||||||
if os.path.islink(b_src_item_path) and os.path.isdir(b_src_item_path) and local_follow is True:
|
|
||||||
shutil.copytree(b_src_item_path, b_dest_item_path, symlinks=not(local_follow))
|
|
||||||
chown_recursive(b_dest_item_path, module)
|
|
||||||
|
|
||||||
if os.path.islink(b_src_item_path) and os.path.isdir(b_src_item_path) and local_follow is False:
|
|
||||||
linkto = os.readlink(b_src_item_path)
|
|
||||||
os.symlink(linkto, b_dest_item_path)
|
|
||||||
|
|
||||||
if os.path.islink(b_src_item_path) and os.path.isfile(b_src_item_path) and local_follow is True:
|
|
||||||
shutil.copyfile(b_src_item_path, b_dest_item_path)
|
|
||||||
if owner is not None:
|
|
||||||
module.set_owner_if_different(b_dest_item_path, owner, False)
|
|
||||||
if group is not None:
|
|
||||||
module.set_group_if_different(b_dest_item_path, group, False)
|
|
||||||
|
|
||||||
if os.path.islink(b_src_item_path) and os.path.isfile(b_src_item_path) and local_follow is False:
|
|
||||||
linkto = os.readlink(b_src_item_path)
|
|
||||||
os.symlink(linkto, b_dest_item_path)
|
|
||||||
|
|
||||||
if not os.path.islink(b_src_item_path) and os.path.isfile(b_src_item_path):
|
|
||||||
shutil.copyfile(b_src_item_path, b_dest_item_path)
|
|
||||||
shutil.copymode(b_src_item_path, b_dest_item_path)
|
|
||||||
if owner is not None:
|
|
||||||
module.set_owner_if_different(b_dest_item_path, owner, False)
|
|
||||||
if group is not None:
|
|
||||||
module.set_group_if_different(b_dest_item_path, group, False)
|
|
||||||
|
|
||||||
if not os.path.islink(b_src_item_path) and os.path.isdir(b_src_item_path):
|
|
||||||
shutil.copytree(b_src_item_path, b_dest_item_path, symlinks=not(local_follow))
|
|
||||||
chown_recursive(b_dest_item_path, module)
|
|
||||||
|
|
||||||
changed = True
|
|
||||||
return changed
|
|
||||||
|
|
||||||
|
|
||||||
def copy_common_dirs(src, dest, module):
|
|
||||||
changed = False
|
|
||||||
common_dirs = filecmp.dircmp(src, dest).common_dirs
|
|
||||||
for item in common_dirs:
|
|
||||||
src_item_path = os.path.join(src, item)
|
|
||||||
dest_item_path = os.path.join(dest, item)
|
|
||||||
b_src_item_path = to_bytes(src_item_path, errors='surrogate_or_strict')
|
|
||||||
b_dest_item_path = to_bytes(dest_item_path, errors='surrogate_or_strict')
|
|
||||||
diff_files_changed = copy_diff_files(b_src_item_path, b_dest_item_path, module)
|
|
||||||
left_only_changed = copy_left_only(b_src_item_path, b_dest_item_path, module)
|
|
||||||
if diff_files_changed or left_only_changed:
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
# recurse into subdirectory
|
|
||||||
changed = changed or copy_common_dirs(os.path.join(src, item), os.path.join(dest, item), module)
|
|
||||||
return changed
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
|
|
||||||
global module
|
|
||||||
|
|
||||||
module = AnsibleModule(
|
|
||||||
# not checking because of daisy chain to file module
|
|
||||||
argument_spec=dict(
|
|
||||||
src=dict(type='path'),
|
|
||||||
_original_basename=dict(type='str'), # used to handle 'dest is a directory' via template, a slight hack
|
|
||||||
content=dict(type='str', no_log=True),
|
|
||||||
dest=dict(type='path', required=True),
|
|
||||||
backup=dict(type='bool', default=False),
|
|
||||||
force=dict(type='bool', default=True, aliases=['thirsty']),
|
|
||||||
validate=dict(type='str'),
|
|
||||||
directory_mode=dict(type='raw'),
|
|
||||||
remote_src=dict(type='bool'),
|
|
||||||
local_follow=dict(type='bool'),
|
|
||||||
checksum=dict(type='str'),
|
|
||||||
),
|
|
||||||
add_file_common_args=True,
|
|
||||||
supports_check_mode=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
if module.params.get('thirsty'):
|
|
||||||
module.deprecate('The alias "thirsty" has been deprecated and will be removed, use "force" instead', version='2.13')
|
|
||||||
|
|
||||||
src = module.params['src']
|
|
||||||
b_src = to_bytes(src, errors='surrogate_or_strict')
|
|
||||||
dest = module.params['dest']
|
|
||||||
# Make sure we always have a directory component for later processing
|
|
||||||
if os.path.sep not in dest:
|
|
||||||
dest = '.{0}{1}'.format(os.path.sep, dest)
|
|
||||||
b_dest = to_bytes(dest, errors='surrogate_or_strict')
|
|
||||||
backup = module.params['backup']
|
|
||||||
force = module.params['force']
|
|
||||||
_original_basename = module.params.get('_original_basename', None)
|
|
||||||
validate = module.params.get('validate', None)
|
|
||||||
follow = module.params['follow']
|
|
||||||
local_follow = module.params['local_follow']
|
|
||||||
mode = module.params['mode']
|
|
||||||
owner = module.params['owner']
|
|
||||||
group = module.params['group']
|
|
||||||
remote_src = module.params['remote_src']
|
|
||||||
checksum = module.params['checksum']
|
|
||||||
|
|
||||||
if not os.path.exists(b_src):
|
|
||||||
module.fail_json(msg="Source %s not found" % (src))
|
|
||||||
if not os.access(b_src, os.R_OK):
|
|
||||||
module.fail_json(msg="Source %s not readable" % (src))
|
|
||||||
|
|
||||||
# Preserve is usually handled in the action plugin but mode + remote_src has to be done on the
|
|
||||||
# remote host
|
|
||||||
if module.params['mode'] == 'preserve':
|
|
||||||
module.params['mode'] = '0%03o' % stat.S_IMODE(os.stat(b_src).st_mode)
|
|
||||||
mode = module.params['mode']
|
|
||||||
|
|
||||||
checksum_dest = None
|
|
||||||
|
|
||||||
if os.path.isfile(src):
|
|
||||||
checksum_src = module.sha1(src)
|
|
||||||
else:
|
|
||||||
checksum_src = None
|
|
||||||
|
|
||||||
# Backwards compat only. This will be None in FIPS mode
|
|
||||||
try:
|
|
||||||
if os.path.isfile(src):
|
|
||||||
md5sum_src = module.md5(src)
|
|
||||||
else:
|
|
||||||
md5sum_src = None
|
|
||||||
except ValueError:
|
|
||||||
md5sum_src = None
|
|
||||||
|
|
||||||
changed = False
|
|
||||||
|
|
||||||
if checksum and checksum_src != checksum:
|
|
||||||
module.fail_json(
|
|
||||||
msg='Copied file does not match the expected checksum. Transfer failed.',
|
|
||||||
checksum=checksum_src,
|
|
||||||
expected_checksum=checksum
|
|
||||||
)
|
|
||||||
|
|
||||||
# Special handling for recursive copy - create intermediate dirs
|
|
||||||
if dest.endswith(os.sep):
|
|
||||||
if _original_basename:
|
|
||||||
dest = os.path.join(dest, _original_basename)
|
|
||||||
b_dest = to_bytes(dest, errors='surrogate_or_strict')
|
|
||||||
dirname = os.path.dirname(dest)
|
|
||||||
b_dirname = to_bytes(dirname, errors='surrogate_or_strict')
|
|
||||||
if not os.path.exists(b_dirname):
|
|
||||||
try:
|
|
||||||
(pre_existing_dir, new_directory_list) = split_pre_existing_dir(dirname)
|
|
||||||
except AnsibleModuleError as e:
|
|
||||||
e.result['msg'] += ' Could not copy to {0}'.format(dest)
|
|
||||||
module.fail_json(**e.results)
|
|
||||||
|
|
||||||
os.makedirs(b_dirname)
|
|
||||||
directory_args = module.load_file_common_arguments(module.params)
|
|
||||||
directory_mode = module.params["directory_mode"]
|
|
||||||
if directory_mode is not None:
|
|
||||||
directory_args['mode'] = directory_mode
|
|
||||||
else:
|
|
||||||
directory_args['mode'] = None
|
|
||||||
adjust_recursive_directory_permissions(pre_existing_dir, new_directory_list, module, directory_args, changed)
|
|
||||||
|
|
||||||
if os.path.isdir(b_dest):
|
|
||||||
basename = os.path.basename(src)
|
|
||||||
if _original_basename:
|
|
||||||
basename = _original_basename
|
|
||||||
dest = os.path.join(dest, basename)
|
|
||||||
b_dest = to_bytes(dest, errors='surrogate_or_strict')
|
|
||||||
|
|
||||||
if os.path.exists(b_dest):
|
|
||||||
if os.path.islink(b_dest) and follow:
|
|
||||||
b_dest = os.path.realpath(b_dest)
|
|
||||||
dest = to_native(b_dest, errors='surrogate_or_strict')
|
|
||||||
if not force:
|
|
||||||
module.exit_json(msg="file already exists", src=src, dest=dest, changed=False)
|
|
||||||
if os.access(b_dest, os.R_OK) and os.path.isfile(b_dest):
|
|
||||||
checksum_dest = module.sha1(dest)
|
|
||||||
else:
|
|
||||||
if not os.path.exists(os.path.dirname(b_dest)):
|
|
||||||
try:
|
|
||||||
# os.path.exists() can return false in some
|
|
||||||
# circumstances where the directory does not have
|
|
||||||
# the execute bit for the current user set, in
|
|
||||||
# which case the stat() call will raise an OSError
|
|
||||||
os.stat(os.path.dirname(b_dest))
|
|
||||||
except OSError as e:
|
|
||||||
if "permission denied" in to_native(e).lower():
|
|
||||||
module.fail_json(msg="Destination directory %s is not accessible" % (os.path.dirname(dest)))
|
|
||||||
module.fail_json(msg="Destination directory %s does not exist" % (os.path.dirname(dest)))
|
|
||||||
|
|
||||||
if not os.access(os.path.dirname(b_dest), os.W_OK) and not module.params['unsafe_writes']:
|
|
||||||
module.fail_json(msg="Destination %s not writable" % (os.path.dirname(dest)))
|
|
||||||
|
|
||||||
backup_file = None
|
|
||||||
if checksum_src != checksum_dest or os.path.islink(b_dest):
|
|
||||||
if not module.check_mode:
|
|
||||||
try:
|
|
||||||
if backup:
|
|
||||||
if os.path.exists(b_dest):
|
|
||||||
backup_file = module.backup_local(dest)
|
|
||||||
# allow for conversion from symlink.
|
|
||||||
if os.path.islink(b_dest):
|
|
||||||
os.unlink(b_dest)
|
|
||||||
open(b_dest, 'w').close()
|
|
||||||
if validate:
|
|
||||||
# if we have a mode, make sure we set it on the temporary
|
|
||||||
# file source as some validations may require it
|
|
||||||
if mode is not None:
|
|
||||||
module.set_mode_if_different(src, mode, False)
|
|
||||||
if owner is not None:
|
|
||||||
module.set_owner_if_different(src, owner, False)
|
|
||||||
if group is not None:
|
|
||||||
module.set_group_if_different(src, group, False)
|
|
||||||
if "%s" not in validate:
|
|
||||||
module.fail_json(msg="validate must contain %%s: %s" % (validate))
|
|
||||||
(rc, out, err) = module.run_command(validate % src)
|
|
||||||
if rc != 0:
|
|
||||||
module.fail_json(msg="failed to validate", exit_status=rc, stdout=out, stderr=err)
|
|
||||||
b_mysrc = b_src
|
|
||||||
if remote_src and os.path.isfile(b_src):
|
|
||||||
_, b_mysrc = tempfile.mkstemp(dir=os.path.dirname(b_dest))
|
|
||||||
|
|
||||||
shutil.copyfile(b_src, b_mysrc)
|
|
||||||
try:
|
|
||||||
shutil.copystat(b_src, b_mysrc)
|
|
||||||
except OSError as err:
|
|
||||||
if err.errno == errno.ENOSYS and mode == "preserve":
|
|
||||||
module.warn("Unable to copy stats {0}".format(to_native(b_src)))
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
|
|
||||||
# might be needed below
|
|
||||||
if PY3 and hasattr(os, 'listxattr'):
|
|
||||||
try:
|
|
||||||
src_has_acls = 'system.posix_acl_access' in os.listxattr(src)
|
|
||||||
except Exception as e:
|
|
||||||
# assume unwanted ACLs by default
|
|
||||||
src_has_acls = True
|
|
||||||
|
|
||||||
module.atomic_move(b_mysrc, dest, unsafe_writes=module.params['unsafe_writes'])
|
|
||||||
|
|
||||||
if PY3 and hasattr(os, 'listxattr') and platform.system() == 'Linux' and not remote_src:
|
|
||||||
# atomic_move used above to copy src into dest might, in some cases,
|
|
||||||
# use shutil.copy2 which in turn uses shutil.copystat.
|
|
||||||
# Since Python 3.3, shutil.copystat copies file extended attributes:
|
|
||||||
# https://docs.python.org/3/library/shutil.html#shutil.copystat
|
|
||||||
# os.listxattr (along with others) was added to handle the operation.
|
|
||||||
|
|
||||||
# This means that on Python 3 we are copying the extended attributes which includes
|
|
||||||
# the ACLs on some systems - further limited to Linux as the documentation above claims
|
|
||||||
# that the extended attributes are copied only on Linux. Also, os.listxattr is only
|
|
||||||
# available on Linux.
|
|
||||||
|
|
||||||
# If not remote_src, then the file was copied from the controller. In that
|
|
||||||
# case, any filesystem ACLs are artifacts of the copy rather than preservation
|
|
||||||
# of existing attributes. Get rid of them:
|
|
||||||
|
|
||||||
if src_has_acls:
|
|
||||||
# FIXME If dest has any default ACLs, there are not applied to src now because
|
|
||||||
# they were overridden by copystat. Should/can we do anything about this?
|
|
||||||
# 'system.posix_acl_default' in os.listxattr(os.path.dirname(b_dest))
|
|
||||||
|
|
||||||
try:
|
|
||||||
clear_facls(dest)
|
|
||||||
except ValueError as e:
|
|
||||||
if 'setfacl' in to_native(e):
|
|
||||||
# No setfacl so we're okay. The controller couldn't have set a facl
|
|
||||||
# without the setfacl command
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
except RuntimeError as e:
|
|
||||||
# setfacl failed.
|
|
||||||
if 'Operation not supported' in to_native(e):
|
|
||||||
# The file system does not support ACLs.
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
|
|
||||||
except (IOError, OSError):
|
|
||||||
module.fail_json(msg="failed to copy: %s to %s" % (src, dest), traceback=traceback.format_exc())
|
|
||||||
changed = True
|
|
||||||
else:
|
|
||||||
changed = False
|
|
||||||
|
|
||||||
if checksum_src is None and checksum_dest is None:
|
|
||||||
if remote_src and os.path.isdir(module.params['src']):
|
|
||||||
b_src = to_bytes(module.params['src'], errors='surrogate_or_strict')
|
|
||||||
b_dest = to_bytes(module.params['dest'], errors='surrogate_or_strict')
|
|
||||||
|
|
||||||
if src.endswith(os.path.sep) and os.path.isdir(module.params['dest']):
|
|
||||||
diff_files_changed = copy_diff_files(b_src, b_dest, module)
|
|
||||||
left_only_changed = copy_left_only(b_src, b_dest, module)
|
|
||||||
common_dirs_changed = copy_common_dirs(b_src, b_dest, module)
|
|
||||||
owner_group_changed = chown_recursive(b_dest, module)
|
|
||||||
if diff_files_changed or left_only_changed or common_dirs_changed or owner_group_changed:
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
if src.endswith(os.path.sep) and not os.path.exists(module.params['dest']):
|
|
||||||
b_basename = to_bytes(os.path.basename(src), errors='surrogate_or_strict')
|
|
||||||
b_dest = to_bytes(os.path.join(b_dest, b_basename), errors='surrogate_or_strict')
|
|
||||||
b_src = to_bytes(os.path.join(module.params['src'], ""), errors='surrogate_or_strict')
|
|
||||||
if not module.check_mode:
|
|
||||||
shutil.copytree(b_src, b_dest, symlinks=not(local_follow))
|
|
||||||
chown_recursive(dest, module)
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
if not src.endswith(os.path.sep) and os.path.isdir(module.params['dest']):
|
|
||||||
b_basename = to_bytes(os.path.basename(src), errors='surrogate_or_strict')
|
|
||||||
b_dest = to_bytes(os.path.join(b_dest, b_basename), errors='surrogate_or_strict')
|
|
||||||
b_src = to_bytes(os.path.join(module.params['src'], ""), errors='surrogate_or_strict')
|
|
||||||
if not module.check_mode and not os.path.exists(b_dest):
|
|
||||||
shutil.copytree(b_src, b_dest, symlinks=not(local_follow))
|
|
||||||
changed = True
|
|
||||||
chown_recursive(dest, module)
|
|
||||||
if module.check_mode and not os.path.exists(b_dest):
|
|
||||||
changed = True
|
|
||||||
if os.path.exists(b_dest):
|
|
||||||
diff_files_changed = copy_diff_files(b_src, b_dest, module)
|
|
||||||
left_only_changed = copy_left_only(b_src, b_dest, module)
|
|
||||||
common_dirs_changed = copy_common_dirs(b_src, b_dest, module)
|
|
||||||
owner_group_changed = chown_recursive(b_dest, module)
|
|
||||||
if diff_files_changed or left_only_changed or common_dirs_changed or owner_group_changed:
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
if not src.endswith(os.path.sep) and not os.path.exists(module.params['dest']):
|
|
||||||
b_basename = to_bytes(os.path.basename(module.params['src']), errors='surrogate_or_strict')
|
|
||||||
b_dest = to_bytes(os.path.join(b_dest, b_basename), errors='surrogate_or_strict')
|
|
||||||
if not module.check_mode and not os.path.exists(b_dest):
|
|
||||||
os.makedirs(b_dest)
|
|
||||||
b_src = to_bytes(os.path.join(module.params['src'], ""), errors='surrogate_or_strict')
|
|
||||||
diff_files_changed = copy_diff_files(b_src, b_dest, module)
|
|
||||||
left_only_changed = copy_left_only(b_src, b_dest, module)
|
|
||||||
common_dirs_changed = copy_common_dirs(b_src, b_dest, module)
|
|
||||||
owner_group_changed = chown_recursive(b_dest, module)
|
|
||||||
if diff_files_changed or left_only_changed or common_dirs_changed or owner_group_changed:
|
|
||||||
changed = True
|
|
||||||
if module.check_mode and not os.path.exists(b_dest):
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
res_args = dict(
|
|
||||||
dest=dest, src=src, md5sum=md5sum_src, checksum=checksum_src, changed=changed
|
|
||||||
)
|
|
||||||
if backup_file:
|
|
||||||
res_args['backup_file'] = backup_file
|
|
||||||
|
|
||||||
module.params['dest'] = dest
|
|
||||||
if not module.check_mode:
|
|
||||||
file_args = module.load_file_common_arguments(module.params)
|
|
||||||
res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed'])
|
|
||||||
|
|
||||||
module.exit_json(**res_args)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
- name: "htcondor docker image"
|
|
||||||
file:
|
|
||||||
path: "/container/docker-images/htcondor"
|
|
||||||
state: directory
|
|
||||||
owner: "{{unpriv_user}}"
|
|
||||||
group: docker
|
|
||||||
mode: "u=rwx,g=rwx,o=rx"
|
|
||||||
|
|
||||||
- copy:
|
|
||||||
dest: "/container/docker-images/htcondor/Dockerfile"
|
|
||||||
src: "htcondor.Dockerfile"
|
|
||||||
owner: "{{unpriv_user}}"
|
|
||||||
group: docker
|
|
||||||
register: cp_dockerfile
|
|
||||||
|
|
||||||
- docker_image:
|
|
||||||
name: "htcondor"
|
|
||||||
# pull: False
|
|
||||||
build:
|
|
||||||
pull: False
|
|
||||||
path: "/container/docker-images/htcondor"
|
|
||||||
source: build
|
|
||||||
force_source: "{{cp_dockerfile.changed}}"
|
|
||||||
|
|
||||||
- name: "copy htcondor container configuration"
|
|
||||||
copy:
|
|
||||||
src: "conf/{{item}}/"
|
|
||||||
dest: "/container/volumes/{{item}}/"
|
|
||||||
owner: "{{unpriv_user}}"
|
|
||||||
group: docker
|
|
||||||
mode: "u=rwx,g=rwx"
|
|
||||||
with_items: [ "cm", "exec", "sub", "common"]
|
|
||||||
|
|
||||||
- name: "check if pool shared secret exists"
|
|
||||||
stat:
|
|
||||||
path: "/container/volumes/common/passwords.d/POOL"
|
|
||||||
register: pool_pw
|
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: "create temporary password store"
|
|
||||||
tempfile:
|
|
||||||
state: directory
|
|
||||||
register: pool_pw_tmp
|
|
||||||
|
|
||||||
- name: "generate pool password"
|
|
||||||
copy:
|
|
||||||
dest: "{{pool_pw_tmp.path}}/poolpw"
|
|
||||||
content: "{{lookup('password','/dev/null')}}"
|
|
||||||
no_log: True
|
|
||||||
|
|
||||||
- name: "install pool password"
|
|
||||||
docker_container:
|
|
||||||
name: "condor-common"
|
|
||||||
image: htcondor
|
|
||||||
state: started
|
|
||||||
volumes:
|
|
||||||
- "/container/volumes/common/:/etc/condor/:rw"
|
|
||||||
- "{{pool_pw_tmp.path}}:/tmp/poolpw:ro"
|
|
||||||
detach: False
|
|
||||||
cleanup: True
|
|
||||||
command: "condor_store_cred add -c -i /tmp/poolpw/poolpw"
|
|
||||||
|
|
||||||
- name: "remove tokens since pool password (cert) changed"
|
|
||||||
file:
|
|
||||||
path: "/container/volumes/{{item}}/tokens.d/condor@htc.local"
|
|
||||||
state: absent
|
|
||||||
with_items: [ "cm", "exec", "sub" ]
|
|
||||||
|
|
||||||
always:
|
|
||||||
- name: "remove temporary password store"
|
|
||||||
file:
|
|
||||||
path: "{{pool_pw_tmp.path}}"
|
|
||||||
state: absent
|
|
||||||
when: pool_pw_tmp is defined and pool_pw_tmp.path
|
|
||||||
when: not pool_pw.stat.exists
|
|
||||||
|
|
||||||
- name: "sync common files to individual containers"
|
|
||||||
copy_2:
|
|
||||||
remote_src: True
|
|
||||||
force: True
|
|
||||||
directory_mode: preserve
|
|
||||||
mode: preserve
|
|
||||||
src: "/container/volumes/common/"
|
|
||||||
dest: "/container/volumes/{{item}}/"
|
|
||||||
with_items: [ "cm", "exec", "sub"]
|
|
||||||
|
|
||||||
|
|
||||||
- name: "collect tokens to generate"
|
|
||||||
stat:
|
|
||||||
path: "/container/volumes/{{item}}/tokens.d/condor@htc.local"
|
|
||||||
with_items: [ "cm", "exec", "sub" ]
|
|
||||||
register: tokens_state
|
|
||||||
|
|
||||||
- name: "generate tokens"
|
|
||||||
docker_container:
|
|
||||||
name: "condor-common"
|
|
||||||
image: htcondor
|
|
||||||
state: started
|
|
||||||
volumes:
|
|
||||||
- "/container/volumes/{{item}}/:/etc/condor/:rw"
|
|
||||||
detach: False
|
|
||||||
cleanup: True
|
|
||||||
command: "condor_token_create -identity condor@$(domainname) -token /etc/condor/tokens.d/condor@htc.local"
|
|
||||||
with_items: "{{tokens_state.results | rejectattr('stat.exists') | map(attribute='item') | list }}"
|
|
||||||
|
|
||||||
|
|
||||||
- name: "create docker network to make service discovery work"
|
|
||||||
docker_network:
|
|
||||||
name: condor
|
|
||||||
state: present
|
|
||||||
|
|
||||||
# TODO: reserve some address using docker_network_info and assign as aux
|
|
||||||
# address to enable cm to get a static address in order to be reachable from
|
|
||||||
# htcondor running on docker host to enable submitting jobs.
|
|
||||||
|
|
||||||
- name: "run htcondor containers"
|
|
||||||
docker_container:
|
|
||||||
name: "condor-{{item}}"
|
|
||||||
hostname: "condor-{{item}}"
|
|
||||||
domainname: "htc.local"
|
|
||||||
image: htcondor
|
|
||||||
state: started
|
|
||||||
detach: True
|
|
||||||
cleanup: True
|
|
||||||
networks_cli_compatible: True
|
|
||||||
networks:
|
|
||||||
- name: "condor"
|
|
||||||
aliases: [ "condor-{{item}}.htc.local" ]
|
|
||||||
volumes:
|
|
||||||
- "/container/volumes/{{item}}/:/etc/condor/:rw"
|
|
||||||
with_items: [ "cm", "exec", "sub"]
|
|
||||||
# auto_remove: True
|
|
||||||
# mounts:
|
|
||||||
# src: /container/volumes/cm/
|
|
||||||
# dest: /etc/condor/
|
|
||||||
|
|
||||||
|
|
||||||
#- add_host:
|
|
||||||
# hostname: foo
|
|
||||||
# ansible_connection: docker_api
|
|
||||||
# docker_host: ssh://ed-c7-1.virt.magni.thoto.net
|
|
||||||
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
- name: "install docker yum repository"
|
|
||||||
get_url:
|
|
||||||
url: "https://download.docker.com/linux/centos/docker-ce.repo"
|
|
||||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
|
||||||
checksum: sha256:8ab5599eef0afcac10cbd3e8670873efee20fcceb5fb3526a62edeade603cec7
|
|
||||||
|
|
||||||
- yum:
|
|
||||||
name: [ "docker-ce", "python-docker-py" ] # latter for ansible modules
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: "partition container image disk"
|
|
||||||
parted:
|
|
||||||
device: /dev/vdb
|
|
||||||
number: 1
|
|
||||||
state: present
|
|
||||||
# fs_type: xfs
|
|
||||||
|
|
||||||
- filesystem:
|
|
||||||
dev: /dev/vdb1
|
|
||||||
fstype: xfs
|
|
||||||
opts: "-L image-store"
|
|
||||||
|
|
||||||
- mount:
|
|
||||||
path: "/container"
|
|
||||||
src: "/dev/vdb1"
|
|
||||||
fstype: xfs
|
|
||||||
opts: "noatime"
|
|
||||||
state: mounted
|
|
||||||
|
|
||||||
- file:
|
|
||||||
path: "/container/docker"
|
|
||||||
state: directory
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "u=rwx,g=x,o=x"
|
|
||||||
|
|
||||||
- name: "link docker configuration to new container partition"
|
|
||||||
file:
|
|
||||||
path: "/var/lib/docker"
|
|
||||||
src: "/container/docker"
|
|
||||||
state: link
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "u=rwx,g=x,o=x"
|
|
||||||
|
|
||||||
- name: "enable docker service in systemd"
|
|
||||||
service:
|
|
||||||
name: docker
|
|
||||||
enabled: True
|
|
||||||
state: started
|
|
||||||
|
|
||||||
- name: "fix user privileges to run docker"
|
|
||||||
user:
|
|
||||||
name: "{{unpriv_user}}"
|
|
||||||
groups: docker
|
|
||||||
append: True
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
container_privileged: False
|
|
||||||
slurm_user: slurm
|
|
||||||
slurm_log_path_ctld: /var/log/slurm/slurmctld.log
|
|
||||||
slurm_log_path_d: /var/log/slurm/slurmd.log
|
|
||||||
slurm_log_path_sched: /var/log/slurm/slurmsched.log
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -f "/etc/munge/munge.key" ] ; then
|
|
||||||
chown munge:munge /etc/munge/munge.key
|
|
||||||
chmod 600 /etc/munge/munge.key
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$@"
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
FROM docker.io/library/centos:7 as base
|
|
||||||
|
|
||||||
RUN yum install -y epel-release && \
|
|
||||||
yum install -y slurm && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
RUN yum install -y less iproute bind-utils nmap-ncat net-tools && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
|
|
||||||
|
|
||||||
RUN chown root:root /usr/local/sbin/entrypoint.sh && \
|
|
||||||
chmod 755 /usr/local/sbin/entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/sbin/entrypoint.sh" ]
|
|
||||||
|
|
||||||
ARG slurmuser=slurm
|
|
||||||
ENV slurmuser=${slurmuser}
|
|
||||||
|
|
||||||
RUN useradd -d /var/lib/slurm -m --no-log-init --system $slurmuser &&\
|
|
||||||
slurm-setuser -u $slurmuser -g $slurmuser -y
|
|
||||||
|
|
||||||
ENV SLURMCTLD_LOG_PATH="/var/log/slurm/slurmctld.log"
|
|
||||||
ENV SLURMD_LOG_PATH="/var/log/slurm/slurmd.log"
|
|
||||||
ENV SLURM_SCHED_LOG_PATH="/var/log/slurm/slurmsched.log"
|
|
||||||
|
|
||||||
FROM base as slurmd
|
|
||||||
|
|
||||||
RUN yum install -y slurm-slurmd && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
CMD bash -c 'cat <({ su -s /bin/sh -c "munged -F" munge & \
|
|
||||||
slurmd -D 2>/dev/null 1>/dev/null & \
|
|
||||||
tail --retry --pid $! -f ${SLURMD_LOG_PATH} ${SLURM_SCHED_LOG_PATH} & })'
|
|
||||||
|
|
||||||
FROM base as slurmctld
|
|
||||||
|
|
||||||
RUN yum install -y slurm-slurmctld && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
CMD bash -c 'cat <({ su -s /bin/sh -c "munged -F" munge & \
|
|
||||||
su -s /bin/sh -c "slurmctld -D" ${slurmuser} 2>/dev/null 1>/dev/null & \
|
|
||||||
tail --retry --pid $! -f ${SLURMCTLD_LOG_PATH} ${SLURM_SCHED_LOG_PATH} & })'
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
FROM docker.io/library/centos:7 as base
|
|
||||||
|
|
||||||
RUN yum install -y epel-release && \
|
|
||||||
yum install -y slurm && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
RUN yum install -y less iproute bind-utils nmap-ncat net-tools && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
|
|
||||||
|
|
||||||
RUN chown root:root /usr/local/sbin/entrypoint.sh && \
|
|
||||||
chmod 755 /usr/local/sbin/entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/sbin/entrypoint.sh" ]
|
|
||||||
|
|
||||||
ARG slurmuser=slurm
|
|
||||||
ENV slurmuser=${slurmuser}
|
|
||||||
|
|
||||||
RUN useradd -d /var/lib/slurm -m --no-log-init --system $slurmuser &&\
|
|
||||||
slurm-setuser -u $slurmuser -g $slurmuser -y
|
|
||||||
|
|
||||||
RUN yum install -y slurm-slurmctld && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
ENV SLURMCTLD_LOG_PATH="/var/log/slurm/slurmctld.log"
|
|
||||||
ENV SLURMD_LOG_PATH="/var/log/slurm/slurmd.log"
|
|
||||||
ENV SLURM_SCHED_LOG_PATH="/var/log/slurm/slurmsched.log"
|
|
||||||
|
|
||||||
CMD bash -c 'cat <({ su -s /bin/sh -c "munged -F" munge & \
|
|
||||||
su -s /bin/sh -c "slurmctld -D" ${slurmuser} 2>/dev/null 1>/dev/null & \
|
|
||||||
tail --retry --pid $! -f ${SLURMCTLD_LOG_PATH} ${SLURM_SCHED_LOG_PATH} & })'
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
FROM docker.io/library/centos:7
|
|
||||||
|
|
||||||
RUN yum install -y epel-release && \
|
|
||||||
yum install -y slurm && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
RUN yum install -y less iproute bind-utils nmap-ncat net-tools && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
|
|
||||||
|
|
||||||
RUN chown root:root /usr/local/sbin/entrypoint.sh && \
|
|
||||||
chmod 755 /usr/local/sbin/entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/sbin/entrypoint.sh" ]
|
|
||||||
|
|
||||||
ARG slurmuser=slurm
|
|
||||||
ENV slurmuser=${slurmuser}
|
|
||||||
|
|
||||||
RUN useradd -d /var/lib/slurm -m --no-log-init --system $slurmuser &&\
|
|
||||||
slurm-setuser -u $slurmuser -g $slurmuser -y
|
|
||||||
|
|
||||||
RUN yum install -y slurm-slurmd && \
|
|
||||||
yum clean all && rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
ENV SLURMCTLD_LOG_PATH="/var/log/slurm/slurmctld.log"
|
|
||||||
ENV SLURMD_LOG_PATH="/var/log/slurm/slurmd.log"
|
|
||||||
ENV SLURM_SCHED_LOG_PATH="/var/log/slurm/slurmsched.log"
|
|
||||||
|
|
||||||
CMD bash -c 'cat <({ su -s /bin/sh -c "munged -F" munge & \
|
|
||||||
slurmd -D 2>/dev/null 1>/dev/null & \
|
|
||||||
tail --retry --pid $! -f ${SLURMD_LOG_PATH} ${SLURM_SCHED_LOG_PATH} & })'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
- name: reconfigure slurm
|
|
||||||
command:
|
|
||||||
cmd: docker container exec -it slurm-ctl scontrol reconfigure
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
- file:
|
|
||||||
path: "/container/docker-images/{{item}}"
|
|
||||||
state: directory
|
|
||||||
owner: "{{unpriv_user}}"
|
|
||||||
group: docker
|
|
||||||
|
|
||||||
- copy:
|
|
||||||
src: "{{item}}.Dockerfile"
|
|
||||||
dest: "/container/docker-images/{{item}}/Dockerfile"
|
|
||||||
owner: "{{unpriv_user}}"
|
|
||||||
group: docker
|
|
||||||
register: slurm_cp_dockerfile
|
|
||||||
|
|
||||||
- copy:
|
|
||||||
src: "entrypoint.sh"
|
|
||||||
dest: "/container/docker-images/{{item}}/entrypoint.sh"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: u=rwx,g=rx,o=rx
|
|
||||||
register: slurm_cp_entrypt
|
|
||||||
|
|
||||||
- docker_image:
|
|
||||||
name: "slurm-{{item}}"
|
|
||||||
# pull: False
|
|
||||||
build:
|
|
||||||
pull: False
|
|
||||||
path: "/container/docker-images/{{item}}"
|
|
||||||
# target: "{{item}}" # unsupported on old docker-py versions as in el7
|
|
||||||
source: build
|
|
||||||
force_source: "{{slurm_cp_dockerfile.changed or slurm_cp_entrypt.changed}}"
|
|
||||||
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
- name: 'install slurm tools on host'
|
|
||||||
yum:
|
|
||||||
name: [ slurm, slurm-doc ]
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- include_tasks: dockerimage.yml
|
|
||||||
loop:
|
|
||||||
- slurmctld
|
|
||||||
- slurmd
|
|
||||||
|
|
||||||
- name: generate munge key
|
|
||||||
shell:
|
|
||||||
cmd: dd if=/dev/urandom bs=1 count=1024 >/etc/munge/munge.key
|
|
||||||
creates: /etc/munge/munge.key
|
|
||||||
|
|
||||||
- name: set permissions on munge key
|
|
||||||
file:
|
|
||||||
path: /etc/munge/munge.key
|
|
||||||
owner: munge
|
|
||||||
group: munge
|
|
||||||
mode: u=rw,g=,o=
|
|
||||||
|
|
||||||
- file:
|
|
||||||
path: /container/volumes/munge
|
|
||||||
state: directory
|
|
||||||
owner: munge
|
|
||||||
group: munge
|
|
||||||
mode: u=rwx,g=,o=
|
|
||||||
|
|
||||||
- name: copy munge key to docker containers
|
|
||||||
copy:
|
|
||||||
remote_src: True
|
|
||||||
force: true
|
|
||||||
mode: preserve
|
|
||||||
src: /etc/munge/munge.key
|
|
||||||
dest: /container/volumes/munge/munge.key
|
|
||||||
|
|
||||||
- file:
|
|
||||||
path: /container/volumes/slurm/
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: upload slurm config
|
|
||||||
template:
|
|
||||||
force: true
|
|
||||||
src: "{{item}}.j2"
|
|
||||||
dest: "/container/volumes/slurm/{{item}}"
|
|
||||||
loop:
|
|
||||||
- slurm.conf
|
|
||||||
- cgroup.conf
|
|
||||||
notify: reconfigure slurm
|
|
||||||
tags: [ slurm-config ]
|
|
||||||
|
|
||||||
- name: "create docker network to make service discovery work"
|
|
||||||
docker_network:
|
|
||||||
name: slurm
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: "create docker volume for shared access between nodes"
|
|
||||||
docker_volume:
|
|
||||||
name: slurm-shared
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
slurm_nodes: # default nodes: controller and submit machine
|
|
||||||
- machine: ctl
|
|
||||||
image: slurm-slurmctld
|
|
||||||
- machine: submit1
|
|
||||||
image: slurm-slurmd
|
|
||||||
extra_mounts:
|
|
||||||
- "/home/{{unpriv_user}}/job3/:/mnt/:rw"
|
|
||||||
tags: [ slurm-config ]
|
|
||||||
|
|
||||||
# TODO: reserve some address using docker_network_info and assign as aux
|
|
||||||
# address to enable slurmctld to get a static address in order to be
|
|
||||||
# reachable from slurm running on docker host to enable submitting jobs.
|
|
||||||
|
|
||||||
- name: run slurm docker containers
|
|
||||||
docker_container:
|
|
||||||
name: "slurm-{{item.machine}}"
|
|
||||||
hostname: "slurm-{{item.machine}}"
|
|
||||||
domainname: "slurm.local"
|
|
||||||
volumes: "{{default_mounts + ( item.extra_mounts | default([]) ) }}"
|
|
||||||
networks:
|
|
||||||
- name: "slurm"
|
|
||||||
env:
|
|
||||||
slurmuser: "{{slurm_user}}"
|
|
||||||
image: "{{item.image}}"
|
|
||||||
state: started
|
|
||||||
detach: True
|
|
||||||
cleanup: True
|
|
||||||
privileged: "{{ container_privileged | bool }}"
|
|
||||||
networks_cli_compatible: True
|
|
||||||
vars:
|
|
||||||
default_mounts:
|
|
||||||
- /container/volumes/slurm/:/etc/slurm/:rw
|
|
||||||
- /container/volumes/munge/munge.key:/etc/munge/munge.key:rw
|
|
||||||
- slurm-shared:/shared/:rw
|
|
||||||
slurm_nodes_all: | # add execute nodes
|
|
||||||
{% for i in range(1, 4) -%}
|
|
||||||
{% set _ = slurm_nodes.extend([
|
|
||||||
{'machine':'exec%s'|format(i), 'image': 'slurm-slurmd'}]) -%}
|
|
||||||
{%- endfor %}
|
|
||||||
{{ slurm_nodes }}
|
|
||||||
loop: "{{slurm_nodes_all}}"
|
|
||||||
tags: [ slurm-config ]
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
###
|
|
||||||
#
|
|
||||||
# Slurm cgroup support configuration file
|
|
||||||
#
|
|
||||||
# See man slurm.conf and man cgroup.conf for further
|
|
||||||
# information on cgroup configuration parameters
|
|
||||||
#--
|
|
||||||
CgroupAutomount=yes
|
|
||||||
|
|
||||||
ConstrainCores=no
|
|
||||||
ConstrainRAMSpace=no
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
#
|
|
||||||
# See the slurm.conf man page for more information.
|
|
||||||
#
|
|
||||||
ControlMachine=slurm-ctl
|
|
||||||
# ControlAddr=127.0.0.1
|
|
||||||
#BackupController=
|
|
||||||
#BackupAddr=
|
|
||||||
#
|
|
||||||
AuthType=auth/munge
|
|
||||||
#CheckpointType=checkpoint/none
|
|
||||||
CryptoType=crypto/munge
|
|
||||||
#DisableRootJobs=NO
|
|
||||||
#EnforcePartLimits=NO
|
|
||||||
#Epilog=
|
|
||||||
#EpilogSlurmctld=
|
|
||||||
#FirstJobId=1
|
|
||||||
#MaxJobId=999999
|
|
||||||
#GresTypes=
|
|
||||||
#GroupUpdateForce=0
|
|
||||||
#GroupUpdateTime=600
|
|
||||||
#JobCheckpointDir=/var/slurm/checkpoint
|
|
||||||
#JobCredentialPrivateKey=
|
|
||||||
#JobCredentialPublicCertificate=
|
|
||||||
#JobFileAppend=0
|
|
||||||
#JobRequeue=1
|
|
||||||
#JobSubmitPlugins=
|
|
||||||
#KillOnBadExit=0
|
|
||||||
#LaunchType=launch/slurm
|
|
||||||
#Licenses=foo*4,bar
|
|
||||||
#MailProg=/bin/true
|
|
||||||
#MaxJobCount=5000
|
|
||||||
#MaxStepCount=40000
|
|
||||||
#MaxTasksPerNode=128
|
|
||||||
MpiDefault=pmix
|
|
||||||
# when running slurmd as user change to: MpiDefault=none
|
|
||||||
#MpiParams=ports=#-#
|
|
||||||
#PluginDir=
|
|
||||||
#PlugStackConfig=
|
|
||||||
#PrivateData=jobs
|
|
||||||
{% if container_privileged -%}
|
|
||||||
ProctrackType=proctrack/cgroup
|
|
||||||
{% else -%}
|
|
||||||
{# when not running privileged docker container, cgroups cannot be used and
|
|
||||||
jobs fail without comment in any log #}
|
|
||||||
ProctrackType=proctrack/linuxproc
|
|
||||||
{% endif %}
|
|
||||||
#Prolog=
|
|
||||||
#PrologFlags=
|
|
||||||
#PrologSlurmctld=
|
|
||||||
#PropagatePrioProcess=0
|
|
||||||
#PropagateResourceLimits=
|
|
||||||
#PropagateResourceLimitsExcept=
|
|
||||||
#RebootProgram=
|
|
||||||
ReturnToService=1
|
|
||||||
#SallocDefaultCommand=
|
|
||||||
SlurmctldPidFile=/var/run/slurm/slurmctld.pid
|
|
||||||
SlurmctldPort=6817
|
|
||||||
SlurmdPidFile=/var/run/slurm/slurmd.pid
|
|
||||||
SlurmdPort=6818
|
|
||||||
SlurmdSpoolDir=/var/spool/slurm/d
|
|
||||||
SlurmUser={{slurm_user}}
|
|
||||||
SlurmdUser=root
|
|
||||||
# SlurmdUser=slurm -> sbatch does not work
|
|
||||||
#SrunEpilog=
|
|
||||||
#SrunProlog=
|
|
||||||
StateSaveLocation=/var/spool/slurm/ctld
|
|
||||||
SwitchType=switch/none
|
|
||||||
#TaskEpilog=
|
|
||||||
TaskPlugin=task/none
|
|
||||||
#TaskPluginParam=
|
|
||||||
#TaskProlog=
|
|
||||||
#TopologyPlugin=topology/tree
|
|
||||||
#TmpFS=/tmp
|
|
||||||
#TrackWCKey=no
|
|
||||||
#TreeWidth=
|
|
||||||
#UnkillableStepProgram=
|
|
||||||
#UsePAM=0
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# TIMERS
|
|
||||||
#BatchStartTimeout=10
|
|
||||||
#CompleteWait=0
|
|
||||||
#EpilogMsgTime=2000
|
|
||||||
#GetEnvTimeout=2
|
|
||||||
#HealthCheckInterval=0
|
|
||||||
#HealthCheckProgram=
|
|
||||||
InactiveLimit=0
|
|
||||||
KillWait=30
|
|
||||||
#MessageTimeout=10
|
|
||||||
#ResvOverRun=0
|
|
||||||
MinJobAge=300
|
|
||||||
#OverTimeLimit=0
|
|
||||||
SlurmctldTimeout=120
|
|
||||||
SlurmdTimeout=300
|
|
||||||
#UnkillableStepTimeout=60
|
|
||||||
#VSizeFactor=0
|
|
||||||
Waittime=0
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# SCHEDULING
|
|
||||||
#DefMemPerCPU=0
|
|
||||||
#FastSchedule=1
|
|
||||||
#MaxMemPerCPU=0
|
|
||||||
#SchedulerTimeSlice=30
|
|
||||||
SchedulerType=sched/backfill
|
|
||||||
SelectType=select/linear
|
|
||||||
#SelectTypeParameters=
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# JOB PRIORITY
|
|
||||||
#PriorityFlags=
|
|
||||||
#PriorityType=priority/basic
|
|
||||||
#PriorityDecayHalfLife=
|
|
||||||
#PriorityCalcPeriod=
|
|
||||||
#PriorityFavorSmall=
|
|
||||||
#PriorityMaxAge=
|
|
||||||
#PriorityUsageResetPeriod=
|
|
||||||
#PriorityWeightAge=
|
|
||||||
#PriorityWeightFairshare=
|
|
||||||
#PriorityWeightJobSize=
|
|
||||||
#PriorityWeightPartition=
|
|
||||||
#PriorityWeightQOS=
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# LOGGING AND ACCOUNTING
|
|
||||||
#AccountingStorageEnforce=0
|
|
||||||
#AccountingStorageHost=
|
|
||||||
#AccountingStorageLoc=
|
|
||||||
#AccountingStoragePass=
|
|
||||||
#AccountingStoragePort=
|
|
||||||
AccountingStorageType=accounting_storage/none
|
|
||||||
#AccountingStorageUser=
|
|
||||||
AccountingStoreJobComment=YES
|
|
||||||
ClusterName=cluster
|
|
||||||
#DebugFlags=Steps,TraceJobs
|
|
||||||
#JobCompHost=
|
|
||||||
JobCompLoc=/tmp/jobcomp
|
|
||||||
#JobCompPass=
|
|
||||||
#JobCompPort=
|
|
||||||
JobCompType=jobcomp/filetxt
|
|
||||||
#JobCompUser=
|
|
||||||
#JobContainerType=job_container/none
|
|
||||||
JobAcctGatherFrequency=30
|
|
||||||
JobAcctGatherType=jobacct_gather/none
|
|
||||||
SlurmctldDebug=verbose
|
|
||||||
SlurmctldLogFile={{slurm_log_path_ctld}}
|
|
||||||
SlurmdDebug=verbose
|
|
||||||
SlurmdLogFile={{slurm_log_path_d}}
|
|
||||||
SlurmSchedLogFile={{slurm_log_path_sched}}
|
|
||||||
#SlurmSchedLogLevel=
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# POWER SAVE SUPPORT FOR IDLE NODES (optional)
|
|
||||||
#SuspendProgram=
|
|
||||||
#ResumeProgram=
|
|
||||||
#SuspendTimeout=
|
|
||||||
#ResumeTimeout=
|
|
||||||
#ResumeRate=
|
|
||||||
#SuspendExcNodes=
|
|
||||||
#SuspendExcParts=
|
|
||||||
#SuspendRate=
|
|
||||||
#SuspendTime=
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# COMPUTE NODES
|
|
||||||
NodeName=slurm-exec[1-{{num_nodes}}] CPUs=2 CoresPerSocket=2 State=UNKNOWN
|
|
||||||
NodeName=slurm-submit1 CPUs=1 State=UNKNOWN
|
|
||||||
PartitionName=debug Nodes=slurm-exec[1-{{num_nodes}}] AllocNodes=slurm-submit1 Default=YES MaxTime=INFINITE State=UP
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
- yum:
|
|
||||||
name: singularity
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: "enable user namespaces for singularity fakeroot function"
|
|
||||||
sysctl:
|
|
||||||
name: user.max_user_namespaces
|
|
||||||
value: "15000"
|
|
||||||
sysctl_file: /etc/sysctl.d/90-max_net_namespaces.conf
|
|
||||||
|
|
||||||
- name: "enable user thoto for fakeroot access"
|
|
||||||
lineinfile:
|
|
||||||
line: "{{unpriv_user}}:4294836224:65536"
|
|
||||||
dest: "{{item}}"
|
|
||||||
with_items: ["/etc/subuid", "/etc/subgid"]
|
|
||||||
# the task above idempotentially does the same as:
|
|
||||||
#- shell:
|
|
||||||
# command: singularity config fakeroot --add thoto
|
|
||||||
Reference in New Issue
Block a user