Skip to content

Commit 8c888ae

Browse files
committed
Update Readme
1 parent 24dd2cd commit 8c888ae

File tree

1 file changed

+12
-39
lines changed

1 file changed

+12
-39
lines changed

README.md

+12-39
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ The mastery of the ensemble is determined by the quantity and quality of plays p
1717
* `host_vars/` - variables defined per host
1818
* `play_vars/` - variables defined per play in playbooks
1919
* `inventory_file` - inventory file with hosts related to the environment
20+
* `molecule/` - molecule v2 configuration
21+
* `resources/` - shared among molecule scenarios resources
22+
* `scenario_name/` - specific molecule scenarios divided by platform, default - docker containers
2023
* `playbooks/` - directory for playbooks, playbook per application
2124
* `roles/` - custom roles
2225
* `ansible.cfg` - config for ansible
23-
* `molecule.yml` - config for molecule
2426
* `requirements.txt` - python requirements
2527
* `requirements.yml` - ansible playbooks' requirements
2628
* `site.yml` - playbook containing every app in infrastructure
27-
* `vagrantfile.j2` - custom Vagrantfile template for molecule
2829

2930
# What goes where
3031

@@ -44,6 +45,7 @@ The mastery of the ensemble is determined by the quantity and quality of plays p
4445
* Playbooks contain only roles, groups of hosts and vars files
4546
* Playbook should contain everything needed for application to start
4647
* Avoid setting variables and tasks in playbooks
48+
* You can use `site.yml` as the only entrypoint for your configuration
4749

4850
# Getting started
4951

@@ -53,10 +55,10 @@ The mastery of the ensemble is determined by the quantity and quality of plays p
5355
```sh
5456
git clone [email protected]:express42/ansible-repertory.git
5557
```
56-
* Install [the latest release of Vagrant][Vagrant]
57-
* Install Vagrant DigitalOcean provider
58+
* Install [the latest release of Vagrant][Vagrant] if you will use ansible-repertory with Parallels VMs
59+
* Then install Vagrant plugin for Parallels
5860
```sh
59-
vagrant plugin install vagrant-digitalocean
61+
vagrant plugin install vagrant-parallels
6062
```
6163
* Install prerequisites
6264
```sh
@@ -65,32 +67,18 @@ ansible-galaxy install -r requirements.yml
6567
pip install -r requirements.txt
6668
touch vault.key
6769
```
68-
* Create VMs using Digital Ocean
69-
* %DOTOKEN% - Digital Ocean token (if you haven't got one you can create it at https://cloud.digitalocean.com/settings/api/tokens)
70-
* %SOMENAME% - Name of SSH key at Digital Ocean, it should match your key at https://cloud.digitalocean.com/settings/security
70+
* Run tests
7171
```sh
72-
export DO_TOKEN=%DOTOKEN%
73-
export SSH_KEY_NAME='%SOMENAME%'
74-
molecule converge --provider=digital_ocean
75-
```
76-
* Run idempotence and serverspec tests on your infrastructure
77-
```sh
78-
molecule idempotence --provider=digital_ocean
79-
molecule verify --provider=digital_ocean
80-
```
81-
82-
* Destroy created VMs
83-
```sh
84-
molecule destroy --provider=digital_ocean
72+
molecule test
8573
```
8674

8775
## Using with your infrastructure
8876
* Remove excessive roles from requirements.yml, python modules from requirements.txt and playbooks
8977
* Make changes to site.yml
90-
* Make changes to vars files for molecule environment
78+
* Make changes to vars files in `example` environment
9179
* Test changes with command
9280
```sh
93-
molecule test --provider=digital_ocean
81+
molecule test
9482
```
9583
* Copy molecule environment to new environment
9684
* Make changes to inventory and vars files
@@ -100,7 +88,6 @@ ansible-playbook site.yml --inventory-file=./environments/new_environment/invent
10088
```
10189
## Molecule
10290

103-
First install the [latest release of Vagrant][Vagrant].
10491
```sh
10592
molecule list
10693
molecule converge
@@ -112,18 +99,7 @@ molecule destroy
11299
# Testing using Travis-CI
113100
* Fork git repository
114101
* Add repository into Travis-CI
115-
* Add 'DO_TOKEN' in repository's 'Environment Variables' with token for Digital Ocean
116-
* Clone repository
117-
* Inside repository's working dir run commands
118-
```sh
119-
ssh-keygen -b 4096 -N '' -f deploy_key
120-
gem install travis
121-
travis login
122-
travis encrypt-file deploy_key --add
123-
rm deploy_key deploy_key.pub
124-
git commit -a -m 'Updated Travis CI info'
125-
git push
126-
```
102+
* Push new commits
127103

128104
# ToDo
129105
* Update default packages playbook
@@ -136,9 +112,6 @@ git push
136112
* API calls in playbook dj-wasabi.zabbix-agent made from several servers can interfere with each other
137113
* Workaround: make API calls serial
138114
* While using VirtualBox for testing you should change all mentions of interface 'eth0' to 'eth1'
139-
* Travis check will fail if VMs are already exists in DO
140-
* `molecule verify` doesn't launch the tests until you do not fix all lint errors. It may cause trouble if you use roles from Ansible-galaxy (Molecule checks them too)
141-
* Testinfra testing framework doesn't work well at this moment
142115

143116
# Links
144117
* [Ansible documentation](https://docs.ansible.com/ansible/index.html "Ansible documentation")

0 commit comments

Comments
 (0)