Changeset - 55d6b2e2f4f3
[Not reviewed]
0 6 0
Branko Majic (branko) - 6 years ago 2018-05-27 19:29:40
branko@majic.rs
MAR-129: Fixed linting for backup_server role.
6 files changed with 17 insertions and 15 deletions:
0 comments (0 inline, 0 general)
roles/backup_server/molecule/default/create.yml
Show inline comments
 
@@ -2,7 +2,7 @@
 
- name: Create
 
  hosts: localhost
 
  connection: local
 
  gather_facts: False
 
  gather_facts: false
 
  no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
 
  vars:
 
    molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
roles/backup_server/molecule/default/destroy.yml
Show inline comments
 
@@ -3,7 +3,7 @@
 
- name: Destroy
 
  hosts: localhost
 
  connection: local
 
  gather_facts: False
 
  gather_facts: false
 
  no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
 
  vars:
 
    molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
roles/backup_server/molecule/default/molecule.yml
Show inline comments
 
@@ -9,6 +9,8 @@ driver:
 

	
 
lint:
 
  name: yamllint
 
  options:
 
    config-file: ../../.yamllint.yml
 

	
 
platforms:
 

	
roles/backup_server/molecule/default/playbook.yml
Show inline comments
 
---
 

	
 
- hosts: parameters-mandatory
 
  become: yes
 
  become: true
 
  roles:
 
    - role: backup_server
 
      backup_host_ssh_private_keys:
 
@@ -11,7 +11,7 @@
 
        ecdsa: "{{ lookup('file', 'tests/data/ssh/server_ecdsa') }}"
 

	
 
- hosts: parameters-optional
 
  become: yes
 
  become: true
 
  roles:
 
    - role: backup_server
 
      backup_host_ssh_private_keys:
roles/backup_server/molecule/default/prepare.yml
Show inline comments
 
@@ -2,7 +2,7 @@
 

	
 
- name: Prepare
 
  hosts: all
 
  gather_facts: False
 
  gather_facts: false
 
  tasks:
 

	
 
- hosts: localhost
 
@@ -18,14 +18,14 @@
 
        - tests/data/ssh/client2
 

	
 
- hosts: all
 
  become: yes
 
  become: true
 
  tasks:
 

	
 
    - name: Install python for Ansible
 
      raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
 
      become: True
 
      changed_when: False
 
      become: true
 
      changed_when: false
 

	
 
    - name: Update all caches to avoid errors due to missing remote archives
 
      apt:
 
        update_cache: yes
 
        update_cache: true
roles/backup_server/tasks/main.yml
Show inline comments
 
@@ -25,7 +25,7 @@
 
  group:
 
    name: "{{ item.server | replace('.', '_') | regex_replace('^', 'bak-') }}"
 
    gid: "{{ item.uid | default(omit) }}"
 
    system: yes
 
    system: true
 
  with_items: "{{ backup_clients }}"
 

	
 
- name: Create backup client users
 
@@ -34,8 +34,8 @@
 
    group: "{{ item.server | replace('.', '_') | regex_replace('^', 'bak-') }}"
 
    groups: "backup"
 
    uid: "{{ item.uid | default(omit) }}"
 
    system: yes
 
    createhome: no
 
    system: true
 
    createhome: false
 
    state: present
 
    home: "/srv/backups/{{ item.server }}"
 
  with_items: "{{ backup_clients }}"
 
@@ -76,7 +76,7 @@
 
  authorized_key:
 
    user: "{{ item.server | replace('.', '_') | regex_replace('^', 'bak-') }}"
 
    key: "{{ item.public_key }}"
 
    manage_dir: no
 
    manage_dir: false
 
    state: present
 
  with_items: "{{ backup_clients }}"
 

	
 
@@ -135,7 +135,7 @@
 
  with_dict: "{{ backup_host_ssh_private_keys }}"
 
  notify:
 
    - Restart backup SSH server
 
  no_log: True
 
  no_log: true
 

	
 
- name: Deploy backup OpenSSH server systemd service file
 
  copy:
 
@@ -152,7 +152,7 @@
 
  service:
 
    name: "ssh-backup"
 
    state: started
 
    enabled: yes
 
    enabled: true
 

	
 
- name: Deploy firewall configuration for backup server
 
  template:
0 comments (0 inline, 0 general)