草庐IT

ansible-galaxy

全部标签

git - 如何让 Ansible 检查在剧本中只运行一次?

为了防止使用过时的剧本,我想确保在允许Ansible修改服务器上的任何内容之前,我拥有gitcheckout的更新副本。这就是我尝试过的方式。此操作位于所有游戏书籍包含的文件中:-name:Ensurelocalgitrepositoryisup-to-datelocal_action:gitpullregister:command_resultfailed_when:"'Updating'incommand_result.stdout"问题是这个命令对Ansible连接到的每个节点运行一次,而不是对每个playbook运行只运行一次。我怎样才能避免这种情况?

git - ansible:git 模块挂起

我正在使用Ansible,但我很难让git模块正常工作。我读过几篇遇到同样问题的人的帖子,我查看了ansible文档,好吧,我几乎尝试了所有方法。我找到了一个清晰的教程,在他们使用git之前我一直遵循该教程,但是当我使用我的存储库时我又遇到了问题...:/git任务只是挂起...没有错误,它只是卡住了!这是我的主机文件:[web]dev1ansible_ssh_host=10.0.0.101ansible_ssh_user=root这是在我电脑上的virtualbox上运行的vagrantVM。我从本教程中获取剧本并完成了所有步骤,直到第08步:https://github.com/l

git - ansible:git 模块挂起

我正在使用Ansible,但我很难让git模块正常工作。我读过几篇遇到同样问题的人的帖子,我查看了ansible文档,好吧,我几乎尝试了所有方法。我找到了一个清晰的教程,在他们使用git之前我一直遵循该教程,但是当我使用我的存储库时我又遇到了问题...:/git任务只是挂起...没有错误,它只是卡住了!这是我的主机文件:[web]dev1ansible_ssh_host=10.0.0.101ansible_ssh_user=root这是在我电脑上的virtualbox上运行的vagrantVM。我从本教程中获取剧本并完成了所有步骤,直到第08步:https://github.com/l

git - 使用 become/become_user 的 Ansible 2.1.0 无法设置临时文件的权限

我的服务器上有一个ansible2.1.0,我通过vagrant和PC进行部署。“部署”角色有:-name:uploadcodebecome:truebecome_user:www-datagit:repo=git@bitbucket.org:****.gitdest=/var/www/mainkey_file=/var/www/.ssh/id_rsaaccept_hostkey=trueupdate=yesforce=yesregister:fresh_codenotify:restartphp-fpmtags:fresh_code在这种情况下使用ansible2.1.0我得到一个错

git - 使用 become/become_user 的 Ansible 2.1.0 无法设置临时文件的权限

我的服务器上有一个ansible2.1.0,我通过vagrant和PC进行部署。“部署”角色有:-name:uploadcodebecome:truebecome_user:www-datagit:repo=git@bitbucket.org:****.gitdest=/var/www/mainkey_file=/var/www/.ssh/id_rsaaccept_hostkey=trueupdate=yesforce=yesregister:fresh_codenotify:restartphp-fpmtags:fresh_code在这种情况下使用ansible2.1.0我得到一个错

git - 使用ansible自动使用SSH本地 key 进行git部署

我正在使用vagrant和ansible。我想自动化ansible(Youcancheckmyrepohere)的部署角色。为此,我正在尝试将我的本地sshkey部署到我的VPS和我的vagrantguest计算机(我正在尝试SSH代理转发)。目标使用ansible使用git自动化部署过程。我已经这样做了:----name:read-writegitcheckoutfromgithubgit:repo={{repository}}dest=/home/site地点:---#Variableshereareapplicabletoallhostgroupsrepository:git@b

git - 使用ansible自动使用SSH本地 key 进行git部署

我正在使用vagrant和ansible。我想自动化ansible(Youcancheckmyrepohere)的部署角色。为此,我正在尝试将我的本地sshkey部署到我的VPS和我的vagrantguest计算机(我正在尝试SSH代理转发)。目标使用ansible使用git自动化部署过程。我已经这样做了:----name:read-writegitcheckoutfromgithubgit:repo={{repository}}dest=/home/site地点:---#Variableshereareapplicabletoallhostgroupsrepository:git@b

linux - 如何使用 Ansible 安装 MongoDB?

我是Ansible的初学者,我现在正尝试在Ubuntu14.04主机上安装MongoDB。根据MongoDBinstallationinstructions手动过程如下:sudoapt-keyadv--keyserverhkp://keyserver.ubuntu.com:80--recv2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5echo"deb[arch=amd64,arm64]https://repo.mongodb.org/apt/ubuntuxenial/mongodb-org/3.6multiverse"|sudotee/etc/apt/

linux - 如何使用 Ansible 安装 MongoDB?

我是Ansible的初学者,我现在正尝试在Ubuntu14.04主机上安装MongoDB。根据MongoDBinstallationinstructions手动过程如下:sudoapt-keyadv--keyserverhkp://keyserver.ubuntu.com:80--recv2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5echo"deb[arch=amd64,arm64]https://repo.mongodb.org/apt/ubuntuxenial/mongodb-org/3.6multiverse"|sudotee/etc/apt/

linux - 通过ansible调用远程bash函数

是否可以通过ansiblead-hoc命令(使用shell、命令模块?)调用bash中定义的远程函数(例如添加到存储在/etc/profile.d下的脚本之一)例如,我有以下功能可以查看apt历史记录的状态:functionapt-history(){case"$1"ininstall)cat/var/log/dpkg.log|grep'install';;upgrade|remove)cat/var/log/dpkg.log|grep$1;;rollback)cat/var/log/dpkg.log|grepupgrade|\grep"$2"-A10000000|\grep"$3"-