Created
July 7, 2016 12:39
-
-
Save Daviey/75487a494d9436f1997b87b891262829 to your computer and use it in GitHub Desktop.
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
--- | |
- hosts: keystone | |
tasks: | |
- name: Check if Keystone Domain specific settings enabled | |
local_action: stat path="/somedir" | |
register: somedir | |
- name: DEBUG VAR | |
debug: | |
msg: "somedir = {{ somedir }}" | |
- name: Creating Keystone Domain direcory (if needed) | |
file: | |
dest: "/remotedir/" | |
state: "directory" | |
when: | |
somedir.stat.exists |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TASK [Check if Keystone Domain specific settings enabled] **********************
ok: [amcbk-qb161211 -> localhost]
ok: [amcbk-db161235 -> localhost]
ok: [amcbk-db161203 -> localhost]
TASK [DEBUG VAR] ***************************************************************
ok: [amcbk-qb161211] => {
"msg": "somedir = {u'stat': {u'uid': 0, u'exists': True, u'woth': False, u'mtime': 1467894378.4484422, u'inode': 234893758, u'isgid': False, u'size': 6, u'roth': True, u'isuid': False, u'isreg': False, u'pw_name': u'root', u'gid': 0, u'ischr': False, u'wusr': True, u'xoth': True, u'islnk': False, u'nlink': 2, u'issock': False, u'rgrp': True, u'gr_name': u'root', u'path': u'/somedir', u'xusr': True, u'atime': 1467894378.4484422, u'isdir': True, u'ctime': 1467894378.4484422, u'wgrp': False, u'xgrp': True, u'dev': 64769, u'isblk': False, u'isfifo': False, u'mode': u'0755', u'rusr': True}, u'changed': False}"
}
ok: [amcbk-db161235] => {
"msg": "somedir = {u'stat': {u'uid': 0, u'exists': True, u'woth': False, u'mtime': 1467894378.4484422, u'inode': 234893758, u'isgid': False, u'size': 6, u'roth': True, u'isuid': False, u'isreg': False, u'pw_name': u'root', u'gid': 0, u'ischr': False, u'wusr': True, u'xoth': True, u'islnk': False, u'nlink': 2, u'issock': False, u'rgrp': True, u'gr_name': u'root', u'path': u'/somedir', u'xusr': True, u'atime': 1467894378.4484422, u'isdir': True, u'ctime': 1467894378.4484422, u'wgrp': False, u'xgrp': True, u'dev': 64769, u'isblk': False, u'isfifo': False, u'mode': u'0755', u'rusr': True}, u'changed': False}"
}
ok: [amcbk-db161203] => {
"msg": "somedir = {u'stat': {u'uid': 0, u'exists': True, u'woth': False, u'mtime': 1467894378.4484422, u'inode': 234893758, u'isgid': False, u'size': 6, u'roth': True, u'isuid': False, u'isreg': False, u'pw_name': u'root', u'gid': 0, u'ischr': False, u'wusr': True, u'xoth': True, u'islnk': False, u'nlink': 2, u'issock': False, u'rgrp': True, u'gr_name': u'root', u'path': u'/somedir', u'xusr': True, u'atime': 1467894378.4484422, u'isdir': True, u'ctime': 1467894378.4484422, u'wgrp': False, u'xgrp': True, u'dev': 64769, u'isblk': False, u'isfifo': False, u'mode': u'0755', u'rusr': True}, u'changed': False}"
}
TASK [Creating Keystone Domain direcory (if needed)] ***************************
changed: [amcbk-qb161211]
changed: [amcbk-db161203]
changed: [amcbk-db161235]
PLAY RECAP *********************************************************************
amcbk-db161203 : ok=4 changed=1 unreachable=0 failed=0
amcbk-db161235 : ok=4 changed=1 unreachable=0 failed=0
amcbk-qb161211 : ok=4 changed=1 unreachable=0 failed=0