博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
yaml转python数据格式
阅读量:3944 次
发布时间:2019-05-24

本文共 1079 字,大约阅读时间需要 3 分钟。

absible

[root@room8pc16 myansible]# vim lamp.yml---- name: configure dbservers  hosts: dbservers  tasks:    - name: install mariadb      yum:        name: mariadb-server        state: present    - name: start mariadb      service:        name: mariadb        state: started        enabled: yes- name: configure webservers  hosts: webservers  tasks:    - name: install apache      yum:        name: [httpd, php, php-mysql]        state: latest    - name: start httpd      service:        name: httpd        state: started        enabled: yes

转换成python数据类型

[    {        'name': 'configure dbservers',        'hosts': 'dbservers',        'tasks': [            {                'name': 'install mariadb',                'yum': {                    'name': 'mariadb-server',                    'state': 'present'                }            },            {                'name': 'start mariadb',                'service': {                    'name': 'mariadb',                    'state': 'started',                    'enabled': 'yes'                }            },        ]    }]

转载地址:http://qqnwi.baihongyu.com/

你可能感兴趣的文章
the jacobian matrix and the gradient matrix
查看>>
VS2010 将背景设为保护色
查看>>
ubutun里面用命令行安装软件
查看>>
ubuntu 常用命令
查看>>
SQLite Tutorial 4 : How to export SQLite file into CSV or Excel file
查看>>
Optimizate objective function in matrix
查看>>
Convert polygon faces to triangles or quadrangles
查看>>
read obj in matlab
查看>>
find out the neighbour matrix of a mesh
查看>>
Operators and special characters in matlab
查看>>
As-Conformal-As-Possible Surface Registration
查看>>
qmake Variable Reference
查看>>
Lesson 2 Gradient Desent
查看>>
find border vertex
查看>>
matlab sliced variable
查看>>
create symbolic array
查看>>
TAUCS库的编译(vs2010)
查看>>
color vector using in plotting example points and lines between corresponding vertices
查看>>
mex 里面调用matlab函数
查看>>
matlab中cuda编程中分配grid和block dimension的时候的注意事项
查看>>