导航栏介绍

# viewes
Dashboard 仪表盘展示信息的
Jobs 跑过的任务记录
Schedules 计划任务
My View 查看用户的工作模版,和任务记录
# resources
Templates 任务模版,配置调用playbook执行时的各种参数,从此处添加计划任务
Credentials 配置连接 机器/云主机api Key/自定义的凭证类型 的账号密码等信息
Projects 这里配置项目对应的playbook,可以从Git上拉取或从本地文件夹读取playbook
Inventories 资产清单
Inventory Scripts 自定义获取资产清单的脚本
# access
Organizations 组织管理
Users 用户管理
Teams 用户组管理
# Administration
Credential Types 自定义凭证类型,添加后可在Credentials中使用
Notifications 配置任务通知,支持电子邮件,Twillio电话等
Management Jobs 计划任务管理
Instance Groups 资产组管理
Applications 自定义应用
Settings 设置

打开ssh权限

  1. [xiaoxin@iZ2ze8ow1gy3uiub8glqqzZ ~]$ sudo vim /etc/ansible/ansible.cfg
  2. host_key_checking = False

创建账号

  1. [root@iZ2ze8ow1gy3uiub8glqqzZ ~]# useradd xiaoxin
  2. [root@iZ2ze8ow1gy3uiub8glqqzZ ~]# passwd xiaoxin
  3. Changing password for user xiaoxin.
  4. New password:
  5. Retype new password:
  6. passwd: all authentication tokens updated successfully.

提权root权限

  1. [root@iZ2ze8ow1gy3uiub8glqqzZ ~]# visudo
  2. ## Allow root to run any commands anywhere
  3. root ALL=(ALL) ALL
  4. xiaoxin ALL=(ALL) NOPASSWD: ALL

创建密钥

  1. root@iZ2ze8ow1gy3uiub8glqqzZ ~]# su - xiaoxin
  2. [xiaoxin@iZ2ze8ow1gy3uiub8glqqzZ ~]$ ll
  3. total 0
  4. [xiaoxin@iZ2ze8ow1gy3uiub8glqqzZ ~]$ ssh-keygen -t rsa

创建管理目标服务器的认证方式

Now type credentials ‘NAME‘ and ‘DESCRIPTION‘, then specify the ‘CREDENTIAL TYPE‘ to ‘Machine‘.

Simply, the ‘Machine’ credential will allow you to use the SSH authentication for managing servers. Its support for both password and key-based authentications.

For this guide, we will be using the key-based authentication. So, type the username and paste the private keys for that user.

私钥认证

上面的是私钥,必须得免密到目标机器

  1. [xiaoxin@iZ2ze8ow1gy3uiub8glqqzZ ~]$ ssh-copy-id -i /home/xiaoxin/.ssh/id_rsa.pub xiaoxin@10.0.0.94
  2. /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/xiaoxin/.ssh/id_rsa.pub"
  3. /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  4. /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  5. xiaoxin@10.0.0.94's password:
  6. Number of key(s) added: 1
  7. Now try logging into the machine, with: "ssh 'xiaoxin@10.0.0.94'"
  8. and check to make sure that only the key(s) you wanted were added.

密码认证

创建Inventories

通过Inventories定义通过Ansible tower管理的主机群组。Inventories允许你为几个服务器创建一个组,并且还能很方便的去管理不同的服务器和它们所依赖的环境变量。为了去管理操作服务器,我们必须去创建一个新的inventory group 并且给这组中添加服务器。
同样,点击ansible tower左侧的菜单Inventories,接着点击右边的+按钮,并选择Inventory:

点击inventory—-输入描述内容

接着点解页面上方的主机(HOSTS)按钮,并点击右侧的+,为这个inventory添加主机,

填写主机名( HOST NAME),描述(DESCRIPTION),并且在VARIABLES中,填入目标主机的IP地址 “ansible_host: 10.0.0.94″,并点击保存(SAVE)。

接着我们在页面下方可以看到我们刚才创建的inventory中新添加的hosts,为了确保host的配置,我们可以通过ping命令来检查该host,选中添加的主机前边的复选框,并且点击RUN COMMANDS按钮。

执行后的结果

Ansible-Tower使用文档的更多相关文章

  1. k8s ansible部署部署文档

    一:基础系统准备 ubuntu 1804----> root密码:123456 主要操作:   1.更改网卡名称为eth0: # vim /etc/default/grub GRUB_CMDLI ...

  2. 【Ansible 文档】【译文】Playbooks 变量

    Variables 变量 自动化的存在使得重复的做事情变得很容易,但是我们的系统不可能完全一样. 在某些系统中,你可能想要设置一些与其他系统不一样的行为和配置. 同样地,远程系统的行为和状态也可以影响 ...

  3. 【Ansible 文档】【译文】Ad-Hoc 命令介绍

    Introduction To Ad-Hoc Commands Ad-Hoc命令介绍 下面的例子展示了如何使用 /usr/bin/ansible 来运行ad hoc任务. 什么是ad hoc命令? 一 ...

  4. 【Ansible 文档】【译文】入门教程

    http://docs.ansible.com/ansible/latest/intro_getting_started.html Foreword 前言 到这里,你应该已经安装了Ansible,是时 ...

  5. 【Ansible 文档】【译文】常见问题

    http://docs.ansible.com/ansible/latest/faq.html 如何为一个task或者整个Playbook设置PATH或者任意其他环境变量? 通过environment ...

  6. 【Ansible 文档】【译文】网络支持

    Networking Support 网络支持 Working with Networking Devices 使用网络设备 自从Ansible 2.1开始,你现在可以使用成熟模型 - 编写 play ...

  7. 【Ansible 文档】【译文】Windows 支持

    see also:List of Windows Modules Windows Support Windows 支持 Windows: How Does It Work Windows:如何工作 正 ...

  8. 【Ansible 文档】【译文】配置文件

    这里说明一下配置文件的内容,原文地址:http://docs.ansible.com/ansible/latest/intro_configuration.html 这个与[Ansible 文档]配置 ...

  9. 【Ansible 文档】【译文】动态inventory

    Dynamic Inventory 动态inventory 配置管理系统的用户经常想要保存inventory到不同的软件系统中.Ansible提供了一个基本的基于文本的系统,正如inventory中描 ...

  10. Ansible 如何查看模块文档

    [root@localhost ~]$ ansible-doc -l # 列出所有模块 [root@localhost ~]$ ansible-doc cron # 查看指定模块的文档

随机推荐

  1. 【译文连载】 理解Istio服务网格(第三章 流控)

    第3章 流控.............................................................................................. ...

  2. SpringBoot配置文件的加载优先级顺序

    application.properties加载 Spring Boot启动会扫描以下位置的application.properties或者application.yml文件作为Spring Boot ...

  3. 《Head first设计模式》之观察者模式

    观察者模式定义了对象之间的一对多依赖,这样一来,当一个对象改变状态时,它的所有依赖者都会收到通知并自动更新. 客户有一个WeatherData对象,负责追踪温度.湿度和气压等数据.现在客户给我们提了个 ...

  4. rabbit MQ 消息队列

    为什么会需要消息队列(MQ)? 一.消息队列概述消息队列中间件是分布式系统中重要的组件,主要解决应用解耦,异步消息,流量削锋等问题,实现高性能,高可用,可伸缩和最终一致性架构.目前使用较多的消息队列有 ...

  5. Cacti被监控机器 配置 snmp协议

    SNMP(Simple Network Management Protocol,简单网络管理协议)的前身是简单网关监控协议(SGMP),用来对通信线路进行管理.         snmpd.conf的 ...

  6. 如何在 CentOS 7 / RHEL 7 终端服务器上安装 KVM

    如何在 CnetOS 7 或 RHEL 7(Red Hat 企业版 Linux)服务器上安装和配置 KVM(基于内核的虚拟机)?如何在 CentOS 7 上设置 KVM 并使用云镜像 / cloud- ...

  7. 4,ZooKeeper原理

    1,ZooKeeper概述 ··· 作用:     · ZooKeeper是为分布式应用程序提供的一个分布式开源协调框架,是Hadoop和Hbase的重要组件:     · 主要用于解决分布式集群中应 ...

  8. Linux部署.NetCore站点 使用Supervisor进行托管部署

    前言 之前终于在Linux上部署好了.NetCore站点,但是这个站点非常“脆弱”.当我的ssh连接关闭或者我想在当前连接执行其他命令时候就必须关闭dotnet站点的执行程序.这显然不是我想要达到的效 ...

  9. 关于mac下redis的安装和部署

    近来学习scrap分布式,需要用到redis,但以前没接触过,所以记录一下自己的安装过程. 准备:Mac,redis-5.0.4.tar.gz 1.压缩包到官网下(建议下载稳定版)网址:redis.i ...

  10. jmeter脚本调试过程

    1.添加监听器:查看结果树,再回放脚本 2.权限验证,例如:cookies a.谷歌浏览器F12获取session