https://github.com/zweifisch/ob-ansible
ansible ad-hoc commands in org-mode babel(or better devops with org-mode)
https://github.com/zweifisch/ob-ansible
Last synced: 5 months ago
JSON representation
ansible ad-hoc commands in org-mode babel(or better devops with org-mode)
- Host: GitHub
- URL: https://github.com/zweifisch/ob-ansible
- Owner: zweifisch
- Created: 2015-10-17T09:32:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-18T13:52:36.000Z (almost 9 years ago)
- Last Synced: 2025-03-22T18:45:12.774Z (over 1 year ago)
- Language: Emacs Lisp
- Size: 3.91 KB
- Stars: 34
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* 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