Commit Graph

15 Commits (93d02189f6dcfa0578a0fac0fb1f289369ac13a5)

Author SHA1 Message Date
Brian Coca 9e5737d776 Merge pull request #2661 from mscherer/remove_unsafe_shell_apt_repos
Split a shell snippet in 2 to avoid using use_unsafe_shell=True
9 years ago
Matt Clay 9f622015f1 Added filename option to apt_repository module. 9 years ago
Michael Scherer 8c5e8f0425 Split a shell snippet in 2 to avoid using use_unsafe_shell=True
Since use_unsafe_shell is suspicious from a security point
of view (or it wouldn't be unsafe), the less we have, the less
code we have to toroughly inspect for a security audit.

In this case, the '&&' can be replaced by doing 2 calls to run_command.
9 years ago
Pierre-Louis Bonicoli 2fdb197245 fix error occurring with Debian
Error was: AttributeError: 'SourcesList' object has no attribute 'repos_urls'
9 years ago
Abhijit Menon-Sen 74a27ffe52 Simplify distribution test
If it's Ubuntu, use UbuntuSourcesList; if it's any other apt-friendly
distribution, use SourcesList; otherwise, fail.
9 years ago
Abhijit Menon-Sen 44d16240a8 Make SourcesList __init__ method also set self.module
This was originally required to allow other methods in SourcesList to
fail, but subsequent changes rendered that unnecessary, and it's just
a cleanup now, and avoids passing in module separately to save().
9 years ago
Abhijit Menon-Sen 6afa1da910 Clarify HAVE_PYTHON_APT/install_python_apt handling in apt_repository
1. Don't test check_mode in both the caller and in the callee.
2. Don't test HAVE_PYTHON_APT inside an if that tests HAVE_PYTHON_APT
3. Don't be irritatingly vague about why the module fails ("You may be
   seeing this because…").

Note that if «apt-get -y install python-apt» succeeds with rc==0, but
for some reason python_apt is not usable afterwards, this will break
because the imports in install_python_apt aren't wrapped inside a
try/except.

In other words, we assume that install_python_apt either succeeds or
fails with a traceback. This commit doesn't affect that behaviour.
9 years ago
Abhijit Menon-Sen 653fd34ed7 Fix call to _expand_ppa 9 years ago
verm666 d435d5ce0a This change is in response to issue #133.
The original problem is: apt_repository.py connect to launchpad on
every playbook run. In this patch apt_repository.py checks if required
repository already exists or not. If no - paa will be added, if yes -
just skip actions.
9 years ago
Toshio Kuratomi 50912c9092 Fix apt_repository so that it does not modify the mode of existing repositories 9 years ago
Toshio Kuratomi 720632f568 Merge pull request #338 from pilou-/apt_repository_filemode
apt_repository: fix file mode
9 years ago
Greg DeKoenigsberg 2a5f0bde87 Proper author info for all remaining modules 9 years ago
Matt Martz 7ca732830f Python2.4 fixes
* Ignore accelerate.py
* Don't use a lambda or a ternary
10 years ago
Pierre-Louis Bonicoli 9ca27eedcc apt_repository: fix file mode
'set_mode_if_different' method should be called on dest filename and after
'atomic_move' method
10 years ago
Michael DeHaan 3ed1378067 Some more module categorization. 10 years ago