Skip to content
Snippets Groups Projects
Commit 51aa672d authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent cc4dba49
No related branches found
No related tags found
No related merge requests found
spideroak_username: ''
spideroak_password: ''
spideroak_username:
spideroak_password:
spideroak_include: []
---
# file: roles/spideroak/tasks/main.yml
- name: "SpiderOak Role"
set_fact: role_spideroak_started=true
tags: 'always'
- name: SpiderOak Role
set_fact:
role_spideroak_started: yes
tags:
- always
- block:
- import_tasks: spideroak.yml
when: '"spideroak" not in excluded_roles and spideroak_username is defined and spideroak_username != ""'
when: not excluded_roles or "spideroak" not in excluded_roles and spideroak_username is defined and spideroak_username != ""
---
# file: roles/spideroak/tasks/register.yml
- name: "Stop SpiderOak"
- name: Stop SpiderOak
service:
name='spideroak'
state='stopped'
pattern='SpiderOakONE'
- name: "Transfer Files"
- name: Transfer Files
template:
src='{{ item.template }}'
dest='{{ item.dest }}'
......@@ -15,15 +15,15 @@
group='root'
mode='755'
with_items:
- { template: 'setup.json', dest: '/tmp/spideroak.setup.json'}
- { template: 'etc_init_d_spideroak', dest: '/etc/init.d/spideroak'}
- { template: setup.json', dest: '/tmp/spideroak.setup.json}
- { template: etc_init_d_spideroak', dest: '/etc/init.d/spideroak}
- name: "Setup SpiderOak Host"
- name: Setup SpiderOak Host
shell: SpiderOakONE --setup=/tmp/spideroak.setup.json
async: 9999999
ignore_errors: true
- name: 'Add SpiderOak to Boot-List'
- name: Add SpiderOak to Boot-List
command: update-rc.d spideroak defaults
......
---
# file: roles/spideroak/tasks/spideroak.yml
- name: "Check SpiderOak Requirement"
- name: Check SpiderOak Requirement
shell: ls /usr/bin/SpiderOakONE
register: spideroak_available
failed_when: false
changed_when: false
- name: "Apt Key"
- name: Apt Key
apt_key:
url='https://spideroak.com/dist/spideroak-apt-2016.asc'
state=present
- name: "Apt Repository"
- name: Apt Repository
apt_repository:
repo='deb http://apt.spideroak.com/ubuntu-spideroak-hardy/ release restricted'
state='present'
mode='644'
- name: "Install SpiderOak Agent"
- name: Install SpiderOak Agent
apt:
pkg='spideroakone'
state='present'
......@@ -27,29 +27,29 @@
- import_tasks: register.yml
when: spideroak_reinstall|default(false) == 'true' or (spideroak_available is defined and spideroak_available.stdout != '/usr/bin/SpiderOakONE')
- name: "Stop SpiderOak"
- name: Stop SpiderOak
service:
name='spideroak'
state='stopped'
pattern='SpiderOakONE'
- name: "Wait"
- name: Wait
shell: sleep 5
- name: "Add Directories to SpiderOak"
- name: Add Directories to SpiderOak
shell: SpiderOakONE --include-dir={{ item }}
with_items: '{{ spideroak_include|default([]) }}'
- name: "Add Drupal Files Directory to SpiderOak"
- name: Add Drupal Files Directory to SpiderOak
shell: SpiderOakONE --include-dir={{ jailroot|default('/jails') }}/{{ item.jail.name }}/var/www/files
with_items: '{{ drupal_settings|default([]) }}'
when: item.jail is defined and item.mountpoints is not defined
- name: "Add MySQL Backups to SpiderOak"
- name: Add MySQL Backups to SpiderOak
shell: SpiderOakONE --include-dir=/var/backups/mysql
when: groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql']
- name: "Start SpiderOak"
- name: Start SpiderOak
service:
name='spideroak'
state='started'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment