python读awx文件_ansible-awx
快速上手
1、安裝:
官方安裝文檔:安裝文檔 https://github.com/ansible/awx/blob/devel/INSTALL.md
官方安裝方式分三種:openshift, kubernetes或者Docker Compose
一開始肯定有單機(jī)的方式, 后面再擴(kuò)展集群。最后再弄幾個實例
單機(jī)測試暫時用Docker Compose
軟件包地址: https://github.com/ansible/awx/
環(huán)境準(zhǔn)備:安裝docker
幫助文檔:https://developer.aliyun.com/mirror/docker-ce
安裝完必須要啟動,docker要配置加速
環(huán)境準(zhǔn)備:安裝docker-compose
epel源中已經(jīng)有1.18.0-4.el7版本
yum -y install docker-compose
環(huán)境準(zhǔn)備:安裝ansible
本來打算偷懶, 不裝ansible
結(jié)果需要使用ansible安裝,所以還是裝了
yum -y install ansible
環(huán)境準(zhǔn)備:修改
[root@SYSOPS00170635 installer]# cat inventory
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/python3"
2、跑第一任務(wù)
1、準(zhǔn)備playbook
docker exec -it awx_web /bin/bash
mkdir -p /var/lib/awx/projects
cd /var/lib/awx/projects
在目錄 /var/lib/awx/projects 下創(chuàng)建目錄 test ,在 test 目錄下創(chuàng)建文件 hello.yml, 內(nèi)容如下。
mkdir -p test
vi hello.yml
- name: Hello World Sample
tasks:
- name: Hello Message
debug:
msg: "Hello World!"
2、在awx控制臺創(chuàng)建一個projects
3、創(chuàng)建憑據(jù)
4、創(chuàng)建一個templates
5、運行hello world
遇到問題就初始化, 很好初始化的。刪除掉docker容器重新跑下安裝腳本就初始化了
3、awx介紹
主版本和次版本號的選擇:首先版本不能太新,太新容易有問題。建議1年之前的版本很合適
修訂號:建議使用最新的。
ansible-awx是ansible-tower的開源版
3、ansible-awx架構(gòu)
4、ansible-awx各個組件介紹
高級進(jìn)階
配置介紹
5、高可用集群安裝
6、普通方式安裝
總結(jié)
以上是生活随笔為你收集整理的python读awx文件_ansible-awx的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HDU 5745 La Vie en r
- 下一篇: C# picturebox在form_l