, handlers}/main. ymltouch/etc/ansible/roles/PHP/{defaults, vars, tasks, Meta, handlers}/main. yml
2. compile the httpd module: write a simple tasks/main. yml: * VI/etc/ansible/roles/httpd/tasks/main. yml-Name: Ensure Apache is at the late ST version Yum: PKG ={{ PKG} state = latest definition variable: can be defined
Easy to use roles for large projectsDirectory structure Orchestration650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8C/36/wKiom1hlF-SjFR-QAAHrlrracRc046.png-wh_500x0-wm_3 -wmp_4-s_1176155170.png "title=" 1.png "alt=" Wkiom1hlf-sjfr-qaahrlrracrc046.png-wh_50 "/>One click to install HTTPD and provide serviceCreate a directory structure[[email protected] ansible]# mkdir-p
Roles is similar to the State in the salt-stack, and the State has a certain organizational structure.
Roles is the playbooks directory structure in ansible.
What are the advantages of this division? There are more advantages. If you write everything into playbooks,
This may cause our playbooks to be bloated and should not be read. After modularization,
automation capabilities, androles can help you organize your database well. Rolesallows you to add variables, files, tasks, templates,handlesput them in a folder and then include them. After establishing an effective dependency, you can alsoRolescontains a differentRoles. As with inclusions, you can pass variables toRoles. With these features, you can create a self-containedRolesand it's easy to share it with others.· For example, to use the templat
Ansible module-lineinfile example, ansible-lineinfileLineinfile module details
The lineinfile module is similar to the sed tool in linux, but the articles on the Internet generally only have simple instances, and there are no examples of complicated points.
The following is a common example of the lineinfile Module I h
Ansible is a pythonpackage and is a complete unpackandplay software. The only requirement on the client is that ssh has python and python is installed with the python-simplejson package, which is easy to deploy to the terminal. This article will introduce ansible as a method example for python module library. you can refer to it for reference.
Asible is a very good tool in the operation of tools, I personally prefer, can be flexibly configured according to the needs of yml files to achieve different business needs, because do not need to install the client, the start is very easy, In some cases you might want to write ansible as a library component of Python into your own script, and today's script script will show how ansible can be combined wit
Example of ansible compiling httpd playbook, ansibleplaybook
The following is the content of the playbook. The process is as follows:
1. First, a total of 3 .tar.gz files are downloaded in the local directory of apr, apr-util, and httpd.
2. decompress the three files.
3. Install the pcre and pcre-devel dependency packages.
4. Compile and install apr.
5. Compile and install apr-util.
6. Compile and install h
-util--with-apr=/usr/local/Apr Make Make Install-name:complie httpd Shell:|CD/root/httpd-2.4. - ./configure--prefix=/usr/local/apache--sysconfdir=/etc/Apache--enable-mpms-shared= All--with-z--with-Pcre--with-apr=/usr/local/Apr--with-apr-util=/usr/local/apr-util--with-mpm=Event Make Make InstallAfter compiling, there are a series of actions, such as setting the PATH environment variable, setting the man path, modifying the configuration file, starting httpd, and so on. The
Relationship of roles and administratorsRole featuresAdministrator FeaturesRoles are associated with management through the management-role table {Many-to-many} /* ******** Management-Role Table ******** */ If exists p39_admin_role;create table P39_admin_role ( null comment ' admin id ', Null comment ' role ID ', key admin_id (admin_id), key role_id (role_id)) enginedefault Charset=utf8 comment ' management role ';Functions are ba
, let the model take a few photos from the original frame to another place.The preliminary work is basically completed, and the next step is the post-production process. The preliminary work may be very simple.First open PS, open two imagesPress Ctrl + A to select A photo, and then press Ctrl + C to copy the photo.Click the paint brush tool, click the top soft focus, marked in red, the size should not be too largeNow you can paint the position of another figure, as shown in the figure. The mask
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.