From 85fb7c6d4bb0e0b7340e9f3d12eb6edcb2a64527 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 3 Oct 2012 09:43:38 -0400 Subject: [PATCH] Library functions and modules should be in the 3 man page section. Also the files should end in '.3' --- Makefile | 6 +++--- docs/man/{man1/ansible.apt.man => man3/ansible.apt.3} | 0 .../ansible.apt_repository.3} | 0 .../ansible.assemble.man => man3/ansible.assemble.3} | 0 .../ansible.async_status.3} | 0 .../ansible.authorized_key.3} | 0 .../{man1/ansible.command.man => man3/ansible.command.3} | 0 docs/man/{man1/ansible.copy.man => man3/ansible.copy.3} | 0 .../ansible.easy_install.3} | 0 .../{man1/ansible.facter.man => man3/ansible.facter.3} | 0 docs/man/{man1/ansible.fail.man => man3/ansible.fail.3} | 0 docs/man/{man1/ansible.fetch.man => man3/ansible.fetch.3} | 0 docs/man/{man1/ansible.file.man => man3/ansible.file.3} | 0 .../ansible.fireball.man => man3/ansible.fireball.3} | 0 .../{man1/ansible.get_url.man => man3/ansible.get_url.3} | 0 docs/man/{man1/ansible.git.man => man3/ansible.git.3} | 0 docs/man/{man1/ansible.group.man => man3/ansible.group.3} | 0 .../ansible.ini_file.man => man3/ansible.ini_file.3} | 0 .../ansible.lineinfile.man => man3/ansible.lineinfile.3} | 0 docs/man/{man1/ansible.mount.man => man3/ansible.mount.3} | 0 .../ansible.mysql_db.man => man3/ansible.mysql_db.3} | 0 .../ansible.mysql_user.man => man3/ansible.mysql_user.3} | 0 .../{man1/ansible.nagios.man => man3/ansible.nagios.3} | 0 docs/man/{man1/ansible.ohai.man => man3/ansible.ohai.3} | 0 docs/man/{man1/ansible.pause.man => man3/ansible.pause.3} | 0 docs/man/{man1/ansible.ping.man => man3/ansible.ping.3} | 0 docs/man/{man1/ansible.pip.man => man3/ansible.pip.3} | 0 .../ansible.postgresql_db.3} | 0 .../ansible.postgresql_user.3} | 0 docs/man/{man1/ansible.raw.man => man3/ansible.raw.3} | 0 .../ansible.seboolean.man => man3/ansible.seboolean.3} | 0 .../{man1/ansible.selinux.man => man3/ansible.selinux.3} | 0 .../{man1/ansible.service.man => man3/ansible.service.3} | 0 docs/man/{man1/ansible.setup.man => man3/ansible.setup.3} | 0 docs/man/{man1/ansible.shell.man => man3/ansible.shell.3} | 0 docs/man/{man1/ansible.slurp.man => man3/ansible.slurp.3} | 0 .../ansible.subversion.man => man3/ansible.subversion.3} | 0 .../ansible.supervisorctl.3} | 0 .../ansible.template.man => man3/ansible.template.3} | 0 docs/man/{man1/ansible.user.man => man3/ansible.user.3} | 0 docs/man/{man1/ansible.virt.man => man3/ansible.virt.3} | 0 .../ansible.wait_for.man => man3/ansible.wait_for.3} | 0 docs/man/{man1/ansible.yum.man => man3/ansible.yum.3} | 0 hacking/module_formatter.py | 8 ++++---- packaging/rpm/ansible.spec | 4 +++- 45 files changed, 10 insertions(+), 8 deletions(-) rename docs/man/{man1/ansible.apt.man => man3/ansible.apt.3} (100%) rename docs/man/{man1/ansible.apt_repository.man => man3/ansible.apt_repository.3} (100%) rename docs/man/{man1/ansible.assemble.man => man3/ansible.assemble.3} (100%) rename docs/man/{man1/ansible.async_status.man => man3/ansible.async_status.3} (100%) rename docs/man/{man1/ansible.authorized_key.man => man3/ansible.authorized_key.3} (100%) rename docs/man/{man1/ansible.command.man => man3/ansible.command.3} (100%) rename docs/man/{man1/ansible.copy.man => man3/ansible.copy.3} (100%) rename docs/man/{man1/ansible.easy_install.man => man3/ansible.easy_install.3} (100%) rename docs/man/{man1/ansible.facter.man => man3/ansible.facter.3} (100%) rename docs/man/{man1/ansible.fail.man => man3/ansible.fail.3} (100%) rename docs/man/{man1/ansible.fetch.man => man3/ansible.fetch.3} (100%) rename docs/man/{man1/ansible.file.man => man3/ansible.file.3} (100%) rename docs/man/{man1/ansible.fireball.man => man3/ansible.fireball.3} (100%) rename docs/man/{man1/ansible.get_url.man => man3/ansible.get_url.3} (100%) rename docs/man/{man1/ansible.git.man => man3/ansible.git.3} (100%) rename docs/man/{man1/ansible.group.man => man3/ansible.group.3} (100%) rename docs/man/{man1/ansible.ini_file.man => man3/ansible.ini_file.3} (100%) rename docs/man/{man1/ansible.lineinfile.man => man3/ansible.lineinfile.3} (100%) rename docs/man/{man1/ansible.mount.man => man3/ansible.mount.3} (100%) rename docs/man/{man1/ansible.mysql_db.man => man3/ansible.mysql_db.3} (100%) rename docs/man/{man1/ansible.mysql_user.man => man3/ansible.mysql_user.3} (100%) rename docs/man/{man1/ansible.nagios.man => man3/ansible.nagios.3} (100%) rename docs/man/{man1/ansible.ohai.man => man3/ansible.ohai.3} (100%) rename docs/man/{man1/ansible.pause.man => man3/ansible.pause.3} (100%) rename docs/man/{man1/ansible.ping.man => man3/ansible.ping.3} (100%) rename docs/man/{man1/ansible.pip.man => man3/ansible.pip.3} (100%) rename docs/man/{man1/ansible.postgresql_db.man => man3/ansible.postgresql_db.3} (100%) rename docs/man/{man1/ansible.postgresql_user.man => man3/ansible.postgresql_user.3} (100%) rename docs/man/{man1/ansible.raw.man => man3/ansible.raw.3} (100%) rename docs/man/{man1/ansible.seboolean.man => man3/ansible.seboolean.3} (100%) rename docs/man/{man1/ansible.selinux.man => man3/ansible.selinux.3} (100%) rename docs/man/{man1/ansible.service.man => man3/ansible.service.3} (100%) rename docs/man/{man1/ansible.setup.man => man3/ansible.setup.3} (100%) rename docs/man/{man1/ansible.shell.man => man3/ansible.shell.3} (100%) rename docs/man/{man1/ansible.slurp.man => man3/ansible.slurp.3} (100%) rename docs/man/{man1/ansible.subversion.man => man3/ansible.subversion.3} (100%) rename docs/man/{man1/ansible.supervisorctl.man => man3/ansible.supervisorctl.3} (100%) rename docs/man/{man1/ansible.template.man => man3/ansible.template.3} (100%) rename docs/man/{man1/ansible.user.man => man3/ansible.user.3} (100%) rename docs/man/{man1/ansible.virt.man => man3/ansible.virt.3} (100%) rename docs/man/{man1/ansible.wait_for.man => man3/ansible.wait_for.3} (100%) rename docs/man/{man1/ansible.yum.man => man3/ansible.yum.3} (100%) diff --git a/Makefile b/Makefile index dbc3d39424..1173452fea 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ # make deb ------------------ produce a DEB # make docs ----------------- rebuild the manpages (results are checked in) # make tests ---------------- run the tests -# make pyflakes, make pep8 -- source code checks +# make pyflakes, make pep8 -- source code checks ######################################################## # variable section @@ -58,7 +58,7 @@ RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)" all: clean python -tests: +tests: PYTHONPATH=./lib nosetests -d -v # To force a rebuild of the docs run 'touch VERSION && make docs' @@ -161,4 +161,4 @@ deb: debian # for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory modulepages: - hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man1/ --module-dir=library --template-dir=hacking/templates + hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man3/ --module-dir=library --template-dir=hacking/templates diff --git a/docs/man/man1/ansible.apt.man b/docs/man/man3/ansible.apt.3 similarity index 100% rename from docs/man/man1/ansible.apt.man rename to docs/man/man3/ansible.apt.3 diff --git a/docs/man/man1/ansible.apt_repository.man b/docs/man/man3/ansible.apt_repository.3 similarity index 100% rename from docs/man/man1/ansible.apt_repository.man rename to docs/man/man3/ansible.apt_repository.3 diff --git a/docs/man/man1/ansible.assemble.man b/docs/man/man3/ansible.assemble.3 similarity index 100% rename from docs/man/man1/ansible.assemble.man rename to docs/man/man3/ansible.assemble.3 diff --git a/docs/man/man1/ansible.async_status.man b/docs/man/man3/ansible.async_status.3 similarity index 100% rename from docs/man/man1/ansible.async_status.man rename to docs/man/man3/ansible.async_status.3 diff --git a/docs/man/man1/ansible.authorized_key.man b/docs/man/man3/ansible.authorized_key.3 similarity index 100% rename from docs/man/man1/ansible.authorized_key.man rename to docs/man/man3/ansible.authorized_key.3 diff --git a/docs/man/man1/ansible.command.man b/docs/man/man3/ansible.command.3 similarity index 100% rename from docs/man/man1/ansible.command.man rename to docs/man/man3/ansible.command.3 diff --git a/docs/man/man1/ansible.copy.man b/docs/man/man3/ansible.copy.3 similarity index 100% rename from docs/man/man1/ansible.copy.man rename to docs/man/man3/ansible.copy.3 diff --git a/docs/man/man1/ansible.easy_install.man b/docs/man/man3/ansible.easy_install.3 similarity index 100% rename from docs/man/man1/ansible.easy_install.man rename to docs/man/man3/ansible.easy_install.3 diff --git a/docs/man/man1/ansible.facter.man b/docs/man/man3/ansible.facter.3 similarity index 100% rename from docs/man/man1/ansible.facter.man rename to docs/man/man3/ansible.facter.3 diff --git a/docs/man/man1/ansible.fail.man b/docs/man/man3/ansible.fail.3 similarity index 100% rename from docs/man/man1/ansible.fail.man rename to docs/man/man3/ansible.fail.3 diff --git a/docs/man/man1/ansible.fetch.man b/docs/man/man3/ansible.fetch.3 similarity index 100% rename from docs/man/man1/ansible.fetch.man rename to docs/man/man3/ansible.fetch.3 diff --git a/docs/man/man1/ansible.file.man b/docs/man/man3/ansible.file.3 similarity index 100% rename from docs/man/man1/ansible.file.man rename to docs/man/man3/ansible.file.3 diff --git a/docs/man/man1/ansible.fireball.man b/docs/man/man3/ansible.fireball.3 similarity index 100% rename from docs/man/man1/ansible.fireball.man rename to docs/man/man3/ansible.fireball.3 diff --git a/docs/man/man1/ansible.get_url.man b/docs/man/man3/ansible.get_url.3 similarity index 100% rename from docs/man/man1/ansible.get_url.man rename to docs/man/man3/ansible.get_url.3 diff --git a/docs/man/man1/ansible.git.man b/docs/man/man3/ansible.git.3 similarity index 100% rename from docs/man/man1/ansible.git.man rename to docs/man/man3/ansible.git.3 diff --git a/docs/man/man1/ansible.group.man b/docs/man/man3/ansible.group.3 similarity index 100% rename from docs/man/man1/ansible.group.man rename to docs/man/man3/ansible.group.3 diff --git a/docs/man/man1/ansible.ini_file.man b/docs/man/man3/ansible.ini_file.3 similarity index 100% rename from docs/man/man1/ansible.ini_file.man rename to docs/man/man3/ansible.ini_file.3 diff --git a/docs/man/man1/ansible.lineinfile.man b/docs/man/man3/ansible.lineinfile.3 similarity index 100% rename from docs/man/man1/ansible.lineinfile.man rename to docs/man/man3/ansible.lineinfile.3 diff --git a/docs/man/man1/ansible.mount.man b/docs/man/man3/ansible.mount.3 similarity index 100% rename from docs/man/man1/ansible.mount.man rename to docs/man/man3/ansible.mount.3 diff --git a/docs/man/man1/ansible.mysql_db.man b/docs/man/man3/ansible.mysql_db.3 similarity index 100% rename from docs/man/man1/ansible.mysql_db.man rename to docs/man/man3/ansible.mysql_db.3 diff --git a/docs/man/man1/ansible.mysql_user.man b/docs/man/man3/ansible.mysql_user.3 similarity index 100% rename from docs/man/man1/ansible.mysql_user.man rename to docs/man/man3/ansible.mysql_user.3 diff --git a/docs/man/man1/ansible.nagios.man b/docs/man/man3/ansible.nagios.3 similarity index 100% rename from docs/man/man1/ansible.nagios.man rename to docs/man/man3/ansible.nagios.3 diff --git a/docs/man/man1/ansible.ohai.man b/docs/man/man3/ansible.ohai.3 similarity index 100% rename from docs/man/man1/ansible.ohai.man rename to docs/man/man3/ansible.ohai.3 diff --git a/docs/man/man1/ansible.pause.man b/docs/man/man3/ansible.pause.3 similarity index 100% rename from docs/man/man1/ansible.pause.man rename to docs/man/man3/ansible.pause.3 diff --git a/docs/man/man1/ansible.ping.man b/docs/man/man3/ansible.ping.3 similarity index 100% rename from docs/man/man1/ansible.ping.man rename to docs/man/man3/ansible.ping.3 diff --git a/docs/man/man1/ansible.pip.man b/docs/man/man3/ansible.pip.3 similarity index 100% rename from docs/man/man1/ansible.pip.man rename to docs/man/man3/ansible.pip.3 diff --git a/docs/man/man1/ansible.postgresql_db.man b/docs/man/man3/ansible.postgresql_db.3 similarity index 100% rename from docs/man/man1/ansible.postgresql_db.man rename to docs/man/man3/ansible.postgresql_db.3 diff --git a/docs/man/man1/ansible.postgresql_user.man b/docs/man/man3/ansible.postgresql_user.3 similarity index 100% rename from docs/man/man1/ansible.postgresql_user.man rename to docs/man/man3/ansible.postgresql_user.3 diff --git a/docs/man/man1/ansible.raw.man b/docs/man/man3/ansible.raw.3 similarity index 100% rename from docs/man/man1/ansible.raw.man rename to docs/man/man3/ansible.raw.3 diff --git a/docs/man/man1/ansible.seboolean.man b/docs/man/man3/ansible.seboolean.3 similarity index 100% rename from docs/man/man1/ansible.seboolean.man rename to docs/man/man3/ansible.seboolean.3 diff --git a/docs/man/man1/ansible.selinux.man b/docs/man/man3/ansible.selinux.3 similarity index 100% rename from docs/man/man1/ansible.selinux.man rename to docs/man/man3/ansible.selinux.3 diff --git a/docs/man/man1/ansible.service.man b/docs/man/man3/ansible.service.3 similarity index 100% rename from docs/man/man1/ansible.service.man rename to docs/man/man3/ansible.service.3 diff --git a/docs/man/man1/ansible.setup.man b/docs/man/man3/ansible.setup.3 similarity index 100% rename from docs/man/man1/ansible.setup.man rename to docs/man/man3/ansible.setup.3 diff --git a/docs/man/man1/ansible.shell.man b/docs/man/man3/ansible.shell.3 similarity index 100% rename from docs/man/man1/ansible.shell.man rename to docs/man/man3/ansible.shell.3 diff --git a/docs/man/man1/ansible.slurp.man b/docs/man/man3/ansible.slurp.3 similarity index 100% rename from docs/man/man1/ansible.slurp.man rename to docs/man/man3/ansible.slurp.3 diff --git a/docs/man/man1/ansible.subversion.man b/docs/man/man3/ansible.subversion.3 similarity index 100% rename from docs/man/man1/ansible.subversion.man rename to docs/man/man3/ansible.subversion.3 diff --git a/docs/man/man1/ansible.supervisorctl.man b/docs/man/man3/ansible.supervisorctl.3 similarity index 100% rename from docs/man/man1/ansible.supervisorctl.man rename to docs/man/man3/ansible.supervisorctl.3 diff --git a/docs/man/man1/ansible.template.man b/docs/man/man3/ansible.template.3 similarity index 100% rename from docs/man/man1/ansible.template.man rename to docs/man/man3/ansible.template.3 diff --git a/docs/man/man1/ansible.user.man b/docs/man/man3/ansible.user.3 similarity index 100% rename from docs/man/man1/ansible.user.man rename to docs/man/man3/ansible.user.3 diff --git a/docs/man/man1/ansible.virt.man b/docs/man/man3/ansible.virt.3 similarity index 100% rename from docs/man/man1/ansible.virt.man rename to docs/man/man3/ansible.virt.3 diff --git a/docs/man/man1/ansible.wait_for.man b/docs/man/man3/ansible.wait_for.3 similarity index 100% rename from docs/man/man1/ansible.wait_for.man rename to docs/man/man3/ansible.wait_for.3 diff --git a/docs/man/man1/ansible.yum.man b/docs/man/man3/ansible.yum.3 similarity index 100% rename from docs/man/man1/ansible.yum.man rename to docs/man/man3/ansible.yum.3 diff --git a/hacking/module_formatter.py b/hacking/module_formatter.py index c7605e3ab3..1136fd570b 100755 --- a/hacking/module_formatter.py +++ b/hacking/module_formatter.py @@ -148,7 +148,7 @@ def get_docstring(filename, verbose=False): if isinstance(child, ast.Assign): if 'DOCUMENTATION' in (t.id for t in child.targets): doc = yaml.load(child.value.s) - + except: if verbose: raise @@ -210,7 +210,7 @@ def main(): module_dir = None args = p.parse_args() - + # print "M: %s" % args.module_dir # print "t: %s" % args.type # print "m: %s" % args.module_list @@ -251,7 +251,7 @@ def main(): if args.type == 'man': env.filters['jpfunc'] = man_ify template = env.get_template('man.j2') - outputname = "ansible.%s.man" + outputname = "ansible.%s.3" includecmt = "" includefmt = "" if args.type == 'rst': @@ -330,7 +330,7 @@ def main(): # # # Sneaky: insert author's name from Git config # -# cmd = subprocess.Popen("git config --get user.name", shell=True, +# cmd = subprocess.Popen("git config --get user.name", shell=True, # stdout=subprocess.PIPE, stderr=subprocess.PIPE) # out, err = cmd.communicate() # diff --git a/packaging/rpm/ansible.spec b/packaging/rpm/ansible.spec index 87b46fc9ed..0a7fe9a5c2 100644 --- a/packaging/rpm/ansible.spec +++ b/packaging/rpm/ansible.spec @@ -40,8 +40,9 @@ are transferred to managed machines automatically. mkdir -p $RPM_BUILD_ROOT/etc/ansible/ cp examples/hosts $RPM_BUILD_ROOT/etc/ansible/ cp examples/ansible.cfg $RPM_BUILD_ROOT/etc/ansible/ -mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man1,man3}/ cp -v docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/ +cp -v docs/man/man3/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/ansible cp -v library/* $RPM_BUILD_ROOT/%{_datadir}/ansible/ @@ -56,6 +57,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/ansible %doc README.md PKG-INFO COPYING %doc %{_mandir}/man1/ansible* +%doc %{_mandir}/man3/ansible.* %doc examples/playbooks %changelog