Browse Source

More updates to Readme

David Yurkiewicz 8 months ago
parent
commit
bf8fe8c402
2 changed files with 8 additions and 9 deletions
  1. 6 7
      README.md
  2. 2 2
      miniConfigApply.py

+ 6 - 7
README.md

@@ -4,11 +4,10 @@ miniConfig is a python3 based minimal config management that focuses mainly on a
4 4
 
5 5
 ## Installation
6 6
 
7
-miniConfig requires parallel-ssh:
8
-
7
+miniConfig requires parallel-ssh and gevent. Install requirements by running:
9 8
 
10 9
 ```bash
11
-pip3 install parallel-ssh
10
+pip install -r requirements.txt
12 11
 ```
13 12
 
14 13
 ## Usage
@@ -44,7 +43,7 @@ export miniConfigPass='p@ssw0rd'
44 43
 
45 44
 ## config.json
46 45
 
47
-Config files tell miniConfig what to do. Each role directory should have a `config.json` file. 
46
+Config files tell miniConfig what to do. Each role directory should have a `config.json` file.
48 47
 
49 48
 Example config.json:
50 49
 ```
@@ -91,7 +90,7 @@ List here the packages you want to add and remove:
91 90
     "remove": ["nginx"]
92 91
   }],
93 92
 ```
94
-Note: Each time you apply a configuration, miniConfig will only do the add/remove action if necessary. It runs a verify step before running the action. 
93
+Note: Each time you apply a configuration, miniConfig will only do the add/remove action if necessary. It runs a verify step before running the action.
95 94
 
96 95
 #### commands
97 96
 List here the commands you want to run on the remote hosts:
@@ -116,12 +115,12 @@ List here the files you want to copy to the remote hosts. The action key is mand
116 115
 ```
117 116
 Note: The files listed here must be included under `roles/role-name/files` directory. File ownership/group and mode are optional.
118 117
 
119
-When using the `service_notify` key make sure to include the actual service name. 
118
+When using the `service_notify` key make sure to include the actual service name.
120 119
 
121 120
 
122 121
 
123 122
 ## Applying configurations
124
-Run `miniConfigApply.py` `$rolename` 
123
+Run `miniConfigApply.py` `$rolename`
125 124
 
126 125
 miniConfig writes its log to stdout.
127 126
 ```

+ 2 - 2
miniConfigApply.py

@@ -3,7 +3,6 @@
3 3
 miniConfig
4 4
 A very simple config management system
5 5
 """
6
-
7 6
 import os
8 7
 import sys
9 8
 import json
@@ -11,6 +10,7 @@ import hashlib
11 10
 from pssh.clients.native import ParallelSSHClient
12 11
 from gevent import joinall
13 12
 from pssh.utils import enable_host_logger
13
+# Enable pssh's host logger
14 14
 enable_host_logger()
15 15
 
16 16
 class MiniConfig():
@@ -208,7 +208,7 @@ class MiniConfig():
208 208
                 print('[%s] %s already on system/checksum match local file' % (host, remote_file_path))
209 209
 
210 210
 
211
-    def rm_file(self, file={}):
211
+    def rm_file(self, file):
212 212
         """
213 213
         Removes files provided in config.json
214 214
         """