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
# Ansible managed: /home/drybjed/src/github.com/drybjed/ginas/playbooks/roles/nginx/templates/etc/nginx/sites-available/default.conf.j2 modified on 2014-02-27 16:35:59 by drybjed on ultron | |
server { | |
listen 80 default_server; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 default_server ssl; |
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: elsa | |
tasks: | |
- command: ls -lR / | |
async: 30 | |
poll: 0 |
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: all | |
vars: | |
the_user: '{{ lookup("env","USER") }}' | |
tasks: | |
- shell: groups {{ the_user }} > /tmp/file1 |
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: anna | |
tasks: | |
- shell: "grep ' / ' /etc/mtab | awk '{print $4}'" | |
register: mount_options | |
- debug: var=mount_options |
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: anna | |
tasks: | |
- name: Add bob | |
sudo: yes | |
user: name=bob | |
- name: Add some groups |
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: anna | |
tasks: | |
- name: Add bob | |
sudo: yes | |
user: name=bob2 | |
- name: Add some groups |
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
# Config file | |
{% for interface in interfaces %} | |
{% if interface.additional is defined and interface.additional %} | |
{% if interface.additional['border'] is defined and interface.additional['border'] %} | |
- id: 101 | |
kernel: | |
name: {{ prefix_tables }}{{ interface.name }} | |
ospf: | |
scan_time: 20 |
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
PLAY [localhost] ************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [localhost] | |
TASK: [debug msg="['t', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 's', 't', 'r', 'i', 'n', 'g']"] *** | |
ok: [localhost] => { | |
"msg": "['t', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 's', 't', 'r', 'i', 'n', 'g']" | |
} |
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
--- | |
- name: ensure swap file is allocated | |
command: dd if=/dev/zero of=/swapfile bs=1M count={{ common_swap_size }} creates=/swapfile | |
when: ansible_swaptotal_mb < 1 | |
register: swapfile_init | |
- name: ensure swap file is created | |
command: mkswap /swapfile | |
when: swapfile_init is defined and swapfile_init.changed |
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: localhost | |
vars: | |
deploy_git_repo_path: '/tmp/git-repo' | |
deploy_path: '/tmp/deploy' | |
deploy_dirs: [ '{{ deploy_path }}', '{{ deploy_git_repo_path }}', '{{ deploy_path }}/shared', '{{ deploy_path }}/shared/public' ] | |
deploy_items: |
OlderNewer