Clean tasks files

This commit is contained in:
Alexandre Iooss 2019-02-19 10:49:18 +01:00
parent d4a187e449
commit 98622807e1
7 changed files with 16 additions and 15 deletions

View file

@ -3,8 +3,8 @@
- name: Configure NodeJS pin - name: Configure NodeJS pin
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch' when: ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'
template: template:
src: 'apt/nodejs.j2' src: apt/nodejs.j2
dest: '/etc/apt/preferences.d/nodejs' dest: /etc/apt/preferences.d/nodejs
mode: 0644 mode: 0644
# Install EtherPad dependencies # Install EtherPad dependencies

View file

@ -11,7 +11,7 @@
user: user:
name: etherpad name: etherpad
group: etherpad group: etherpad
home: '/var/local/etherpad' home: /var/local/etherpad
comment: EtherPad comment: EtherPad
system: yes system: yes
state: present state: present
@ -19,7 +19,7 @@
# Security #3 # Security #3
- name: Secure Etherpad home directory - name: Secure Etherpad home directory
file: file:
path: '/var/local/etherpad' path: /var/local/etherpad
state: directory state: directory
owner: etherpad owner: etherpad
group: etherpad group: etherpad

View file

@ -8,8 +8,8 @@
# Download EtherPad # Download EtherPad
- name: Clone EtherPad project - name: Clone EtherPad project
git: git:
repo: 'https://github.com/ether/etherpad-lite.git' repo: https://github.com/ether/etherpad-lite.git
dest: '/var/local/etherpad/etherpad-lite' dest: /var/local/etherpad/etherpad-lite
version: master version: master
become: true become: true
become_user: etherpad become_user: etherpad
@ -19,14 +19,14 @@
- name: Install Etherpad dependencies - name: Install Etherpad dependencies
command: bin/installDeps.sh command: bin/installDeps.sh
args: args:
chdir: '/var/local/etherpad/etherpad-lite' chdir: /var/local/etherpad/etherpad-lite
become: true become: true
become_user: etherpad become_user: etherpad
# Configuration # Configuration
- name: Configure EtherPad - name: Configure EtherPad
lineinfile: lineinfile:
dest: '/var/local/etherpad/etherpad-lite/settings.json' dest: /var/local/etherpad/etherpad-lite/settings.json
regexp: '^\s*"{{ item.key }}"' regexp: '^\s*"{{ item.key }}"'
line: "{{ item.value }}" line: "{{ item.value }}"
with_dict: with_dict:
@ -38,8 +38,8 @@
# Service file # Service file
- name: Install EtherPad systemd unit - name: Install EtherPad systemd unit
template: template:
src: 'systemd/etherpad-lite.service.j2' src: systemd/etherpad-lite.service.j2
dest: '/etc/systemd/system/etherpad-lite.service' dest: /etc/systemd/system/etherpad-lite.service
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644

View file

@ -13,5 +13,5 @@
name: nscd name: nscd
state: restarted state: restarted
ignore_errors: true # Sometimes service do not exist ignore_errors: true # Sometimes service do not exist
listen: 'Restart nslcd service' listen: Restart nslcd service

View file

@ -24,7 +24,7 @@
src: nslcd.conf.j2 src: nslcd.conf.j2
dest: /etc/nslcd.conf dest: /etc/nslcd.conf
mode: 0600 mode: 0600
notify: 'Restart nslcd service' notify: Restart nslcd service
# Configure /etc/nsswitch.conf # Configure /etc/nsswitch.conf
- name: Configure NSS to use LDAP - name: Configure NSS to use LDAP
@ -37,5 +37,5 @@
group: 'group: files ldap' group: 'group: files ldap'
shadow: 'shadow: files ldap' shadow: 'shadow: files ldap'
sudoers: 'sudoers: files ldap' sudoers: 'sudoers: files ldap'
notify: 'Restart nslcd service' notify: Restart nslcd service

View file

@ -19,7 +19,9 @@
# Downtime! # Downtime!
- name: Stop LDAP server - name: Stop LDAP server
service: name=slapd state=stopped service:
name: slapd
state: stopped
# Cry a bit # Cry a bit
- name: Remove old data - name: Remove old data

View file

@ -3,7 +3,6 @@
- name: Install NGINX server - name: Install NGINX server
apt: apt:
name: nginx name: nginx
state: present
update_cache: yes update_cache: yes
# Install sites # Install sites