Schedule and maintenance outage window in CopperEgg monitoring service.
copperegg_api_key
is required. Your api key is at the bottom of your Settings page.
pre_tasks:
- include: mute.yml
# Serge van Ginderachter | |
# Jun 12 | |
# to ansible-devel | |
group_vars/all can also be a directory (and so can be any group or host name) | |
so you could do | |
group_vars/all/normalstuff.yml |
[defaults] | |
remote_user = vagrant | |
hostfile = .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory | |
private_key_file = ~/.vagrant.d/insecure_private_key |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# smsonline | |
use LWP; | |
use HTTP::Request; | |
use URI::Escape; |
Variables | |
========== | |
predefined variables : | |
- inventory_hostname (fqdn) (normally the same as ansible.fqdn) | |
- inventory_hostname_short | |
To know the return codes returned by ansible modules, just use plain ansible -vvv to see them : | |
ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net | |
tungstene.arrfab.net | success >> { | |
"changed": true, |
--- | |
- name: pip - install packages | |
pip: name={{ item.name|default(item) }} | |
{% if item.version|default('') > '' %} | |
version={{ item.version }} | |
{% else %} | |
state=latest | |
{% endif %} | |
with_items: | |
- MySQL-python |
$ ansible-playbook site.yml | |
PLAY [localhost] ************************************************************** | |
TASK: [debug var=abc] ********************************************************* | |
ok: [localhost] => { | |
"abc": "{{ abc }}" | |
} | |
TASK: [command echo "A B C"] ************************************************** |
# | |
# systemctl enable btsync.service | |
# systemctl start btsync.service | |
# | |
# cat /etc/systemd/system/btsync.service | |
[Unit] | |
Description=BTSync | |
Requires=network-online.service | |
After=network-online.service |
--- | |
- hosts: all | |
sudo: True | |
tasks: | |
# Load a variable file based on the OS type, or a default if not found. | |
- include_vars: "{{ item }}" | |
with_first_found: | |
- "{{ ansible_distribution }}.yml" | |
- "{{ ansible_os_family }}.yml" | |
- "default.yml" |
<advancedsettings> | |
<tvshowmatching action="append"> | |
<regexp> ([0-9]+)-([0-9]+) ([^\\/]*)$</regexp> | |
</tvshowmatching> | |
</advancedsettings> |