Skip to content

Commit

Permalink
19-01/14---第一次提交---初始化基础目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
Eron-Liu committed Jan 14, 2019
1 parent c0beb79 commit f9dff2d
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LDAP Installation

**使用 `Ansible` 进行安装配置
**使用 `Ansible` 进行安装配置**

## 配置过程
13 changes: 13 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[defaults]
hostfile = ./inventory
roles_path = ./roles
remote_user = root
private_key_file = ~/.ssh/id_rsa
host_key_checking = False
deprecation_warnings=False


gathering = smart
fact_caching = redis
fact_caching_timeout = 86400
fact_caching_connection = 127.0.0.1:6379:0
5 changes: 5 additions & 0 deletions inventory/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[ldap_server]
172.16.10.220

[ldap_client]
172.16.10.10
15 changes: 15 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ansible==2.7.5
asn1crypto==0.24.0
bcrypt==3.1.5
cffi==1.11.5
cryptography==2.4.2
idna==2.8
Jinja2==2.10
MarkupSafe==1.1.0
paramiko==2.4.2
pyasn1==0.4.5
pycparser==2.19
PyNaCl==1.3.0
PyYAML==3.13
redis==3.0.1
six==1.12.0
38 changes: 38 additions & 0 deletions roles/ldap_init/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Role Name
=========

A brief description of the role goes here.

Requirements
------------

Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables
--------------

A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
roles:
- { role: username.rolename, x: 42 }

License
-------

BSD

Author Information
------------------

An optional section for the role authors to include contact information, or a website (HTML is not allowed).
2 changes: 2 additions & 0 deletions roles/ldap_init/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# defaults file for ldap_init
2 changes: 2 additions & 0 deletions roles/ldap_init/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for ldap_init
60 changes: 60 additions & 0 deletions roles/ldap_init/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
galaxy_info:
author: your name
description: your description
company: your company (optional)

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)

min_ansible_version: 2.4

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:

#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99

galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
2 changes: 2 additions & 0 deletions roles/ldap_init/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# tasks file for ldap_init
2 changes: 2 additions & 0 deletions roles/ldap_init/tests/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
localhost

5 changes: 5 additions & 0 deletions roles/ldap_init/tests/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- ldap_init
2 changes: 2 additions & 0 deletions roles/ldap_init/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# vars file for ldap_init

0 comments on commit f9dff2d

Please sign in to comment.