Skip to content

ansible ad-hoc commands in org-mode babel(or better devops with org-mode)

Notifications You must be signed in to change notification settings

MicLennartz/ob-ansible

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

ob-ansible

ansible ad-hoc commands in org-mode babel(or better devops with org-mode)

supported header arguments

  • inventory
  • hosts
  • user
  • become
  • become-user
  • forks
  • module
  • playbook

examples

inventory

#+NAME: hosts
: [web]
: 10.1.0.13
: 10.1.0.23
: 10.1.0.33

:

#+BEGIN_SRC ansible :inventory hosts :hosts web[0]
uptime
#+END_SRC

specify module

#+BEGIN_SRC ansible :module yum
name=httpd state=present
#+END_SRC

code block as file

#+name: config.conf
#+BEGIN_EXAMPLE
[section]
key=value
#+END_EXAMPLE
#+BEGIN_SRC ansible :module copy
src=config.conf dest=/etc/config.conf
#+END_SRC

playbook

#+BEGIN_SRC ansible :playbook
- hosts: all
  tasks:
  - name: ensure apache2 installed
    package: name=apaache2 state=present
#+END_SRC

About

ansible ad-hoc commands in org-mode babel(or better devops with org-mode)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%