Commit Graph

25 Commits

Author SHA1 Message Date
Rafael Guterres Jeffman
3b32f27508 Merge pull request #348 from t-woerner/new_module_utils_script
New utils script to generate new modules using templates
2020-08-21 16:05:57 -03:00
Thomas Woerner
5fa81a437b New utils script to generate new modules using templates
The script will create the module in plugins/modules, the README, test and
playbook files.

Usage: new_module [options] <module name> <author name>
       <author email address>

Create new ansible-freeipa module using templates.

Options:
  -m          Create module with member support
  -f          Force creation
  -h          Print this help

Example:

    utils/new_module -m permission "My Name" myname@some.email
2020-08-21 18:09:32 +02:00
Thomas Woerner
0395f4136f New script utils/build-srpm.sh to build SRPM
This script gets version and release from git describe --tags. It uses
utils/ansible-freeipa.spec.in and the variables to generate
ansible-freeipa.spec in the top folder.

An archive not including the spec file is created to generate the SRPM from.
2020-08-21 17:55:53 +02:00
Thomas Woerner
3a37325a36 galaxyfy-playbook.py: Fixed script name
The old name was galaxyify-playbook.py instead of galaxyfy-playbook.py
2020-04-02 14:46:54 +02:00
Thomas Woerner
57d407f15f utils/*galaxy*: Make galaxy scripts more generic
The namespace and colleciton name have been hard coded. Now variables are
used for them. The project prefix and collection prefix are now passed to
galaxyify-playbook.py.
2020-04-02 11:26:32 +02:00
Thomas Woerner
a972beb484 ipaserver docs: Calm down module linter
The use of "default: idstart+199999" in the description of the idmax
parameter was resulting in the galaxy import error:

  Cannot parse "DOCUMENTATION": mapping values are not allowed here in
  "<unicode string>", line 52, column 58: ... value for the IDs range
  (default: idstart+199999)

The ":" has simply been removed to fix this issue.
2020-03-30 15:01:55 +02:00
Thomas Woerner
50a1c2f9cd utils/build-galaxy-release: Do not add release tag to version for galaxy
Galaxy does not like the use of the extra "-1" release tag.

Fixes: #236 (Can't install via Galaxy)
2020-03-30 14:45:02 +02:00
Thomas Woerner
b719b1afeb utils/build-galaxy-release.sh: Use ansible-galaxy instead of mazer
ansible-galaxy needs to be used to build the Ansible collection. mazer should
not be used any more.
2019-12-13 22:38:01 +01:00
Thomas Woerner
6ad82e6bc7 ipaclient: Fix misspelled sssd options
The sssd options in the ipaclient role missed a 's' in the role. The readme
of the role used the proper names with 3 's'. The names in the role have
been fixed and if the old setting are used, they will be used in the first
place.

Also utils/ansible-ipa-client-install has been adaped to use the proper
option names now.

This fixes issue #145 (The ipaclient role misspells sssd)
2019-11-20 12:26:29 +01:00
Thomas Woerner
f4680ceb5a utils/ansible-ipa-[server,replica,client]-install: New --ansible-verbose option
This option defines the verbose level for the internal ansible-playbook
run.
2019-08-15 21:29:03 +02:00
Thomas Woerner
3a3fb51109 utils/ansible-ipa-server-install: Add deprecated (unused) --domain-level option
This is option is used in test scripts.
2019-08-15 17:32:42 +02:00
Thomas Woerner
1d5b5d38b7 utils/ansible-ipa-[server,replica,client]-install: New --become-method option
This option is the same as the --become-method option with ansible-playbook.
If this option is set, become_method will be set in the generated playbook.
2019-08-06 12:42:21 +02:00
Thomas Woerner
d43b4429e6 utils/ansible-ipa-[server,replica,client]-install: Print excessive args
Excessive args are printed now. The simple print of the message too many
arguments was not helping.
2019-08-06 12:39:03 +02:00
Thomas Woerner
45af7348fe utils/ansible-ipa-[server,replica,client]-install: Add p.wait() for returncode
The p.wait() call has been missing in the normal case, therefore no proper
returncode has been returned.
2019-08-06 11:32:55 +02:00
Thomas Woerner
b636ab3112 utils/ansible-ipa-[server,replica,client]-install: New --playbook-dir option
If the --playbook-dir option is used, the inventory and playbook files will
be generated in this directory. The files will not be removed after the
playbook processing ended.

If the directory does not exist an error message will be printed and the
utility will not continue.
2019-08-06 09:17:59 +02:00
Thomas Woerner
ab25078b47 ansible-ipa-*-install: Get continuous output working for python2 also
The used code for continuous output from the ansible-playbook call was
only working for Python2. The output has only been printed when the command
finised. This code has been replaced with code that is working with Python2
and Python3.
2019-07-29 13:03:24 +02:00
Thomas Woerner
781ac6e90b ansible-ipa-client-install: The proper option is ipaclient-install-packages
The wrong name has been used for the option of _install_packages.
2019-07-29 13:02:30 +02:00
Thomas Woerner
5179514e0c ansible-ipa-*-install: Use /usr/bin/python by default, fix _install_packages
/usr/bin/python should be used by default. Fixed typo in _install_packages
setting in the inventory file.
2019-07-29 12:33:25 +02:00
Thomas Woerner
203735e143 Utils scripts: ansible-ipa-[server,replica,client]-install
These are utils scripts to do a server,replica or client deployment and
undeployment using the ansible roles. A client inventory and playbook is
generated by the script which is then used with ansible-playbook.

The command line options or the normal command line installers
ipa-server-install, ipa-replica-install and ipa-client-install are all
supported also by these scripts.

Additonally to the commadn line of the normal installers it is needed to
add the fqdn of the host to be installed.

It is needed that the ansible-freeipa roles are available and also usable
by ansible.
2019-07-29 11:57:51 +02:00
Thomas Woerner
515f57eb09 utils/galaxyify-playbook.py: Support to galaxify rule lines in playbooks 2019-07-24 19:21:51 +02:00
Thomas Woerner
62097ee368 utils/[galaxyify-playbook,gen_module_docs].py: flake8 fixes 2019-07-24 19:21:48 +02:00
Thomas Woerner
0240ec34a5 utils/build-galaxy-release.sh: Fix module_utils import in management modules
The prefix has been fixed in the wrong files.
2019-07-23 17:01:05 +02:00
Thomas Woerner
5790f4a703 utils/gen_module_docs.py: Drop parameter name dirserv_cert_files
This parameter name is not used and therefore not needed anymore.
2019-07-23 16:58:17 +02:00
Thomas Woerner
5dd5faccb0 New utils script to update module docs
Usage: sh utils/gen_modules_docs.sh
2019-07-23 10:01:59 +02:00
Thomas Woerner
040d95c519 utils/build-galaxy-release.sh: New build script for galaxy release
This script will to the following steps:

- Fix the galaxy release in galaxy.yml
- Remove emacs backup files
- Link module_utils, modules and action_plugins from roles to plugins/..
- Fix import prefix for module_utils
- Fix module prefixes in playbooks and example playbooks
- Build release using mazer
- Clean up again
2019-07-23 10:00:27 +02:00