草庐IT

ansible-runner

全部标签

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"-

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"-

linux - 使用 Ansible 自动设置加密分区

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭7年前。Improvethisquestion我正在寻找一种在Ubuntu/DebianLinux服务器上自动使用Ansible设置加密分区的方法。假设一台计算机的现有根目录填满

linux - 使用 Ansible 自动设置加密分区

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭7年前。Improvethisquestion我正在寻找一种在Ubuntu/DebianLinux服务器上自动使用Ansible设置加密分区的方法。假设一台计算机的现有根目录填满

linux - 基于匹配属性构建列表(ansible)

尝试构建一个匹配属性(在本例中为ec2_tag)的服务器列表,以安排特定服务器执行特定任务。我正在尝试与selectattr匹配:servers:"{{hostvars[inventory_hostname]|selectattr('ec2_tag_Role','match','cassandra_db_seed_node')|map(attribute='inventory_hostname')|list}}"虽然我从Ansible得到了一个类型错误:fatal:[X.X.X.X]:FAILED!=>{"failed":true,"msg":"Unexpectedtemplating

linux - 基于匹配属性构建列表(ansible)

尝试构建一个匹配属性(在本例中为ec2_tag)的服务器列表,以安排特定服务器执行特定任务。我正在尝试与selectattr匹配:servers:"{{hostvars[inventory_hostname]|selectattr('ec2_tag_Role','match','cassandra_db_seed_node')|map(attribute='inventory_hostname')|list}}"虽然我从Ansible得到了一个类型错误:fatal:[X.X.X.X]:FAILED!=>{"failed":true,"msg":"Unexpectedtemplating

linux - Ansible 备份文件名

当我使用ansible复制文件时,它会备份文件(写backup=yes)。我的问题是关于ansible默认创建的文件名。config.xml.6634.2018-05-22@17:52:12~这个文件名中的6634是什么意思? 最佳答案 是远程Ansible进程的进程ID,可见hereinthesourcecode:ext=time.strftime("%Y-%m-%d@%H:%M:%S~",time.localtime(time.time()))backupdest='%s.%s.%s'%(fn,os.getpid(),ext)^

linux - Ansible 备份文件名

当我使用ansible复制文件时,它会备份文件(写backup=yes)。我的问题是关于ansible默认创建的文件名。config.xml.6634.2018-05-22@17:52:12~这个文件名中的6634是什么意思? 最佳答案 是远程Ansible进程的进程ID,可见hereinthesourcecode:ext=time.strftime("%Y-%m-%d@%H:%M:%S~",time.localtime(time.time()))backupdest='%s.%s.%s'%(fn,os.getpid(),ext)^

linux - 为什么 Ansible 没有在变量中看到属性?

我有Ansible角色“db”,任务很简单:-name:Checkreposapt_repository:repo="{{item.repo}}"state={{item.state}}with_items:-"{{apt_repos}}"在/defaults/mail.yml中:apt_repos:#Percona-{state:present,repo:'debhttp://repo.percona.com/aptwheezymain',keyserver:'keyserver.ubuntu.com',key:'1C4CBDCDCD2EFD2A',needkey:True}-{st