-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from anthcourtney/build
changes for v1.1.8
- Loading branch information
Showing
60 changed files
with
222 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
**/*.retry | ||
**/*.swp | ||
**/*.vagrant | ||
*.output | ||
**/*.pyc | ||
**/*.output | ||
tests/tmp | ||
tests/roles | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/python | ||
|
||
## | ||
# all_mounts.fact | ||
# This is a custom fact that will gather all | ||
# mounts into a fact, ansible_mounts will only | ||
# get mounts that are tied to a physical device | ||
# that will leave out many mounts | ||
## | ||
|
||
import os | ||
import json | ||
|
||
## | ||
# get_file_content | ||
# gets the content of a file | ||
# path - the path to the file | ||
# default - the default return | ||
# strip - strip out whitespace | ||
## | ||
def get_file_content(path, default=None, strip=True): | ||
data = default | ||
if os.path.exists(path) and os.access(path, os.R_OK): | ||
try: | ||
try: | ||
datafile = open(path) | ||
data = datafile.read() | ||
if strip: | ||
data = data.strip() | ||
if len(data) == 0: | ||
data = default | ||
finally: | ||
datafile.close() | ||
except: | ||
pass | ||
return data | ||
|
||
## | ||
# get_mtab_entries | ||
# gets the mtab entries to use | ||
## | ||
def get_mtab_entries(): | ||
|
||
mtab_file = '/etc/mtab' | ||
if not os.path.exists(mtab_file): | ||
mtab_file = '/proc/mounts' | ||
|
||
mtab = get_file_content(mtab_file, '') | ||
mtab_entries = [] | ||
for line in mtab.splitlines(): | ||
fields = line.split() | ||
if len(fields) < 4: | ||
continue | ||
mtab_entries.append(fields) | ||
return mtab_entries | ||
|
||
## Main ## | ||
|
||
mtab_entries = get_mtab_entries() | ||
|
||
mounts = [] | ||
|
||
for fields in mtab_entries: | ||
device, mount, fstype, options = fields[0], fields[1], fields[2], fields[3] | ||
|
||
mount_info = { | ||
'mount': mount, | ||
'device': device, | ||
'fstype': fstype, | ||
'options': options | ||
} | ||
|
||
mounts.append(mount_info) | ||
|
||
print json.dumps(mounts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-1 | ||
- "1.1.1.1" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-1 | ||
- "1.1.1.2" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-1 | ||
- "1.1.1.5" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-1 | ||
- "1.1.1.6" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-1 | ||
- "1.1.1.7" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,3 @@ | |
- level-1 | ||
- "1.2.2" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-1 | ||
- "1.3.1" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,3 @@ | |
- level-1 | ||
- "1.4.2" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,3 @@ | |
- level-1 | ||
- "1.4.3" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,3 @@ | |
- level-1 | ||
- "1.5.1" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- level-1 | ||
- "1.5.2" | ||
- not-scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,3 @@ | |
- level-1 | ||
- "2.2.15" | ||
- scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-3 | ||
- "3.5.2" | ||
- not-scored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ | |
- section-4 | ||
- "4.2.1.5" | ||
- scored | ||
|
Oops, something went wrong.