Skip to content

Instantly share code, notes, and snippets.

View ananya23d's full-sized avatar

Ananya Chatterjee ananya23d

View GitHub Profile
@ananya23d
ananya23d / common.yaml
Last active October 11, 2017 12:39
puppet_poc
#/etc/puppet/hieradata/common.yaml
---
content_key: my first file with hiera data
@ananya23d
ananya23d / etc-ansible-hosts
Created August 31, 2017 09:00
host inventory
localhost
[webservers]
#localhost
[dbservers]
#localhost
@ananya23d
ananya23d / mod2.py
Last active September 5, 2017 12:30
python module to create open and write
#!/usr/bin/python
from ansible.module_utils.basic import *
def foo()
with open("first.txt", w) as f:
f.write("my first file")
f.close()
def main():
@ananya23d
ananya23d / play1.yml
Last active August 31, 2017 03:55
plabook to execute python script and see result on screen
---
- hosts: localhost
tasks:
- name: playbook1
command: python mod1.py
register: output
- debug: var=output.stdout_lines