Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
62097ee3
Commit
62097ee3
authored
Jul 24, 2019
by
Thomas Woerner
Browse files
Options
Downloads
Patches
Plain Diff
utils/[galaxyify-playbook,gen_module_docs].py: flake8 fixes
parent
4cd4f2cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
utils/galaxyify-playbook.py
+6
-5
6 additions, 5 deletions
utils/galaxyify-playbook.py
utils/gen_module_docs.py
+33
-32
33 additions, 32 deletions
utils/gen_module_docs.py
with
39 additions
and
37 deletions
utils/galaxyify-playbook.py
+
6
−
5
View file @
62097ee3
import
os
import
sys
import
sys
import
re
import
re
def
galaxify_playbook
(
playbook_in
):
def
galaxify_playbook
(
playbook_in
):
p1
=
re
.
compile
(
'
(ipa.*:)$
'
)
p1
=
re
.
compile
(
'
(ipa.*:)$
'
)
p2
=
re
.
compile
(
'
(name:) (ipa.*)$
'
)
p2
=
re
.
compile
(
'
(name:) (ipa.*)$
'
)
...
@@ -24,8 +24,8 @@ def galaxify_playbook(playbook_in):
...
@@ -24,8 +24,8 @@ def galaxify_playbook(playbook_in):
elif
include_role
and
stripped
.
startswith
(
"
name:
"
):
elif
include_role
and
stripped
.
startswith
(
"
name:
"
):
line
=
p2
.
sub
(
r
'
\1 freeipa.ansible_freeipa.\2
'
,
line
)
line
=
p2
.
sub
(
r
'
\1 freeipa.ansible_freeipa.\2
'
,
line
)
changed
=
True
changed
=
True
elif
changeable
and
\
elif
changeable
and
not
stripped
.
startswith
(
not
stripped
.
startswith
(
"
freeipa.ansible_freeipa.
"
):
"
freeipa.ansible_freeipa.
"
):
line
=
p1
.
sub
(
r
'
freeipa.ansible_freeipa.\1
'
,
line
)
line
=
p1
.
sub
(
r
'
freeipa.ansible_freeipa.\1
'
,
line
)
changed
=
True
changed
=
True
...
@@ -36,4 +36,5 @@ def galaxify_playbook(playbook_in):
...
@@ -36,4 +36,5 @@ def galaxify_playbook(playbook_in):
for
line
in
lines
:
for
line
in
lines
:
out_f
.
write
(
line
)
out_f
.
write
(
line
)
galaxify_playbook
(
sys
.
argv
[
1
])
galaxify_playbook
(
sys
.
argv
[
1
])
This diff is collapsed.
Click to expand it.
utils/gen_module_docs.py
+
33
−
32
View file @
62097ee3
import
os
import
sys
import
sys
import
re
param_docs
=
{
param_docs
=
{
"
ccache
"
:
"
The local ccache
"
,
"
ccache
"
:
"
The local ccache
"
,
...
@@ -103,14 +101,16 @@ param_docs = {
...
@@ -103,14 +101,16 @@ param_docs = {
"
dirsrv_pin
"
:
"
The password to unlock the Directory Server private key
"
,
"
dirsrv_pin
"
:
"
The password to unlock the Directory Server private key
"
,
"
http_pin
"
:
"
The password to unlock the Apache Server private key
"
,
"
http_pin
"
:
"
The password to unlock the Apache Server private key
"
,
"
pkinit_pin
"
:
"
The password to unlock the Kerberos KDC private key
"
,
"
pkinit_pin
"
:
"
The password to unlock the Kerberos KDC private key
"
,
"
dirsrv_cert_name
"
:
"
Name of the Directory Server SSL certificate to install
"
,
"
dirsrv_cert_name
"
:
"
Name of the Directory Server SSL certificate to install
"
,
"
http_cert_name
"
:
"
Name of the Apache Server SSL certificate to install
"
,
"
http_cert_name
"
:
"
Name of the Apache Server SSL certificate to install
"
,
"
pkinit_cert_name
"
:
"
Name of the Kerberos KDC SSL certificate to install
"
,
"
pkinit_cert_name
"
:
"
Name of the Kerberos KDC SSL certificate to install
"
,
"
keytab
"
:
"
Path to backed up keytab from previous enrollment
"
,
"
keytab
"
:
"
Path to backed up keytab from previous enrollment
"
,
"
mkhomedir
"
:
"
Create home directories for users on their first login
"
,
"
mkhomedir
"
:
"
Create home directories for users on their first login
"
,
"
adtrust_netbios_name
"
:
"
The adtrust netbios_name setting
"
,
"
adtrust_netbios_name
"
:
"
The adtrust netbios_name setting
"
,
"
adtrust_reset_netbios_name
"
:
"
The adtrust reset_netbios_name setting
"
,
"
adtrust_reset_netbios_name
"
:
"
The adtrust reset_netbios_name setting
"
,
"
zonemgr
"
:
"
DNS zone manager e-mail address. Defaults to hostmaster@DOMAIN
"
,
"
zonemgr
"
:
"
DNS zone manager e-mail address. Defaults to hostmaster@DOMAIN
"
,
"
ssh_trust_dns
"
:
"
Configure OpenSSH client to trust DNS SSHFP records
"
,
"
ssh_trust_dns
"
:
"
Configure OpenSSH client to trust DNS SSHFP records
"
,
"
dns_ip_addresses
"
:
"
The dns ip_addresses setting
"
,
"
dns_ip_addresses
"
:
"
The dns ip_addresses setting
"
,
"
dns_reverse_zones
"
:
"
The dns reverse_zones setting
"
,
"
dns_reverse_zones
"
:
"
The dns reverse_zones setting
"
,
...
@@ -167,7 +167,8 @@ param_docs = {
...
@@ -167,7 +167,8 @@ param_docs = {
"
request_cert
"
:
"
Request certificate for the machine
"
,
"
request_cert
"
:
"
Request certificate for the machine
"
,
"
preserve_sssd
"
:
"
Preserve old SSSD configuration if possible
"
,
"
preserve_sssd
"
:
"
Preserve old SSSD configuration if possible
"
,
"
no_sudo
"
:
"
Do not configure SSSD as data source for sudo
"
,
"
no_sudo
"
:
"
Do not configure SSSD as data source for sudo
"
,
"
fixed_primary
"
:
"
Configure sssd to use fixed server as primary IPA server
"
,
"
fixed_primary
"
:
"
Configure sssd to use fixed server as primary IPA server
"
,
"
permit
"
:
"
Disable access rules by default, permit all access
"
,
"
permit
"
:
"
Disable access rules by default, permit all access
"
,
"
no_krb5_offline_passwords
"
:
[
"
no_krb5_offline_passwords
"
:
[
"
Configure SSSD not to store user password when the server is offline
"
"
Configure SSSD not to store user password when the server is offline
"
...
@@ -182,8 +183,6 @@ param_docs = {
...
@@ -182,8 +183,6 @@ param_docs = {
def
gen_module_docs
(
module_in
):
def
gen_module_docs
(
module_in
):
lines
=
[
]
with
open
(
module_in
)
as
in_f
:
with
open
(
module_in
)
as
in_f
:
in_lines
=
in_f
.
readlines
()
in_lines
=
in_f
.
readlines
()
...
@@ -215,7 +214,7 @@ def gen_module_docs(module_in):
...
@@ -215,7 +214,7 @@ def gen_module_docs(module_in):
try
:
try
:
param
,
_dict
=
stripped
.
split
(
"
=
"
,
1
)
param
,
_dict
=
stripped
.
split
(
"
=
"
,
1
)
except
:
except
Exception
:
print
(
"
Failed to split line
'
%s
'"
%
stripped
)
print
(
"
Failed to split line
'
%s
'"
%
stripped
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
@@ -228,7 +227,8 @@ def gen_module_docs(module_in):
...
@@ -228,7 +227,8 @@ def gen_module_docs(module_in):
if
param
not
in
param_docs
:
if
param
not
in
param_docs
:
print
(
"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
)
print
(
"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
)
print
(
"
%s: param
'
%s
'
is not in param_docs
"
%
(
module_in
,
param
))
print
(
"
%s: param
'
%s
'
is not in param_docs
"
%
(
module_in
,
param
))
print
(
"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
)
print
(
"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
@@ -303,4 +303,5 @@ def gen_module_docs(module_in):
...
@@ -303,4 +303,5 @@ def gen_module_docs(module_in):
for
line
in
out_lines
:
for
line
in
out_lines
:
out_f
.
write
(
line
)
out_f
.
write
(
line
)
gen_module_docs
(
sys
.
argv
[
1
])
gen_module_docs
(
sys
.
argv
[
1
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment