https://github.com/moreati/ansible-pathlib
Ansible collection that expose Python pathlib objects
https://github.com/moreati/ansible-pathlib
ansible ansible-collection pathlib
Last synced: 4 months ago
JSON representation
Ansible collection that expose Python pathlib objects
- Host: GitHub
- URL: https://github.com/moreati/ansible-pathlib
- Owner: moreati
- Created: 2021-04-21T23:40:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-21T23:40:25.000Z (over 4 years ago)
- Last Synced: 2025-03-18T07:47:37.739Z (7 months ago)
- Topics: ansible, ansible-collection, pathlib
- Language: Python
- Homepage: https://galaxy.ansible.com/moreati/pathlib
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible Collection - moreati.pathlib
A bare mniimum wrapper arounf the pathlib module.
```
$ ansible-playbook playbooks/demo.yml
PLAY [Demonstrate pathlib filter plugins] ***************************************************************TASK [Gathering Facts] **********************************************************************************
ok: [localhost]TASK [Show components of path] **************************************************************************
ok: [localhost] => {
"msg": {
"path": "/foo/bar/pkg-1.2.3.tar.gz",
"path.anchor": "/",
"path.as_uri()": "file:///foo/bar/pkg-1.2.3.tar.gz",
"path.is_absolute()": true,
"path.name": "pkg-1.2.3.tar.gz",
"path.parent": "/foo/bar",
"path.parents": "[PosixPath('/foo/bar'), PosixPath('/foo'), PosixPath('/')]",
"path.parts": [
"/",
"foo",
"bar",
"pkg-1.2.3.tar.gz"
],
"path.stem": "pkg-1.2.3.tar",
"path.suffix": ".gz",
"path.suffixes": [
".2",
".3",
".tar",
".gz"
]
}
}
```