Coder Social home page Coder Social logo

oneansible's Introduction

Ansible整体说明

这是一个完整的ansible模块,用来服务器的所有变更,包括:系统初始化,配置文件同步,应用部署,应用发布等功能。

1 整体结构说明

ansible目录结构

ansible
├── README
├── ansible.cfg
├── ansible_modul_custom
├── docs
├── init.yml
├── inventories
│   ├── dev
│   │   ├── group_vars
│   │   │   ├── all
│   │   │   └── tomcat
│   │   ├── host_vars
│   │   └── hosts
│   ├── prod
│   └── test
├── playbooks
│   └── test.yml
├── roles
│   ├── commons
│   │   ├── defaults
│   │   │   └── main.yml
│   │   ├── handlers
│   │   │   └── main.yml
│   │   ├── tasks
│   │   │   ├── SELinux.yml
│   │   │   └── main.yml
│   │   └── templates
│   │       ├── 20-nproc.conf
│   │       ├── hosts
│   │       │   ├── etc_hosts_dev
│   │       │   ├── etc_hosts_prod
│   │       │   └── etc_hosts_test
│   │       ├── limits.conf
│   │       ├── rc.local
│   │       ├── sshd_config
│   │       ├── sudoers
│   │       └── sysctl.conf
│   ├── init
│   │   ├── README.md
│   │   ├── defaults
│   │   │   └── main.yml
│   │   ├── files
│   │   │   ├── CentOS-Base.repo
│   │   │   ├── epel.repo
│   │   │   └── iot.repo
│   │   ├── handlers
│   │   │   └── main.yml
│   │   ├── meta
│   │   │   └── main.yml
│   │   ├── tasks
│   │   │   └── main.yml
│   │   ├── templates
│   │   ├── tests
│   │   │   ├── inventory
│   │   │   └── test.yml
│   │   └── vars
│   │       └── main.yml
│   └── tomcat
│       ├── README.md
│       ├── defaults
│       │   └── main.yml
│       ├── files
│       │   └── tomcat
│       │       ├── Catalina
│       │       │   └── localhost
│       │       ├── catalina.policy
│       │       ├── catalina.properties
│       │       ├── conf.d
│       │       │   └── README
│       │       ├── context.xml
│       │       ├── log4j.properties
│       │       ├── logging.properties
│       │       ├── server.xml
│       │       ├── tomcat-users.xml
│       │       ├── tomcat.conf
│       │       └── web.xml
│       ├── handlers
│       │   └── main.yml
│       ├── meta
│       │   └── main.yml
│       ├── tasks
│       │   ├── configure.yml
│       │   ├── deploy.yml
│       │   ├── install.yml
│       │   └── main.yml
│       ├── templates
│       │   └── jenkins
│       ├── tests
│       │   ├── inventory
│       │   └── test.yml
│       └── vars
│           └── main.yml
├── script
│   ├── inithostname.py         #本地脚本
├── site.yml                    #playbook入口
└── tomcat_rolling_update.yml   

2 一些常用操作

2.1 系统初始化:

#1)给所有主机组all初始化,项目名在inventory里面
ansible-playbook -i environments/dev/hosts init.yml --extra-vars "hosts=all"
#或者项目名再次指定
ansible-playbook -i environments/dev/hosts init.yml --extra-vars "hosts=jenkins PROJECT_NAME=jenkins"
#2)更新项目:jenkins
ansible-playbook -i environments/dev/hosts tomcat_rolling_update.yml --extra-vars "hosts=jenkins"
#3)安装项目:rocketmq集群
ansible-playbook -i environments/dev/hosts rocketmq.yml

oneansible's People

Contributors

xiaomaoxue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.