From: Alfredo Deza Date: Mon, 18 Nov 2013 18:34:47 +0000 (-0500) Subject: firewall_install for fedora X-Git-Tag: v1.3.3~14^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4f13de4e81213cbdf55ed10f66506585214eec7;p=ceph-deploy.git firewall_install for fedora Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/fedora/__init__.py b/ceph_deploy/hosts/fedora/__init__.py index 3d105e7..b6f4858 100644 --- a/ceph_deploy/hosts/fedora/__init__.py +++ b/ceph_deploy/hosts/fedora/__init__.py @@ -1,5 +1,5 @@ import mon -from install import install +from install import install, firewall_install from uninstall import uninstall # Allow to set some information about this distro diff --git a/ceph_deploy/hosts/fedora/install.py b/ceph_deploy/hosts/fedora/install.py index d6963ae..5777d8a 100644 --- a/ceph_deploy/hosts/fedora/install.py +++ b/ceph_deploy/hosts/fedora/install.py @@ -1,3 +1,4 @@ +from ceph_deploy.util import pkg_managers, templates from ceph_deploy.lib.remoto import process @@ -61,3 +62,26 @@ def install(distro, version_kind, version, adjust_repos): 'ceph', ], ) + + +def firewall_install(distro, repo_url, gpg_url, adjust_repos): + repo_url = repo_url.strip('/') # Remove trailing slashes + + if adjust_repos: + process.run( + distro.conn, + [ + 'rpm', + '--import', + gpg_url, + ] + ) + + ceph_repo_content = templates.ceph_repo.format( + repo_url=repo_url, + gpg_url=gpg_url + ) + + distro.conn.remote_module.write_yum_repo(ceph_repo_content) + + pkg_managers.yum(distro.conn, 'ceph')