Feat: add state

Signed-off-by: Hadrien Patte <hadrien.patte@protonmail.com>
This commit is contained in:
Hadrien Patte 2019-03-23 19:25:04 +01:00
parent e4a60341c5
commit 737ca7b996
No known key found for this signature in database
GPG key ID: 0954F2874A54F4B1
11 changed files with 31 additions and 10 deletions

View file

@ -42,6 +42,7 @@
- name: Install fail2ban
apt:
name: fail2ban
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
@ -79,6 +80,7 @@
- name: Install debsums
apt:
name: debsums
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -2,8 +2,9 @@
# For HTTPS apt
- name: Install HTTPS apt
apt:
name: apt-transport-https
update_cache: true
name: apt-transport-https
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
@ -12,6 +13,7 @@
apt_key:
url: https://dl.yarnpkg.com/debian/pubkey.gpg
id: 1646B01B86E50310
state: present
register: apt_key_result
retries: 3
until: apt_key_result is succeeded
@ -19,12 +21,14 @@
- name: Configure Yarn repository
apt_repository:
repo: deb https://dl.yarnpkg.com/debian/ stable main
state: present
# Install CodiMD dependencies
- name: Install required packages
apt:
name: yarn
update_cache: true
name: yarn
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -22,8 +22,9 @@
# Install
- name: Install DokuWiki
apt:
name: dokuwiki
update_cache: true
name: dokuwiki
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -2,8 +2,9 @@
# Install EtherPad dependencies
- name: Install required packages
apt:
name: curl
update_cache: true
name: curl
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -2,11 +2,12 @@
# Install LDAP client packages
- name: Install LDAP client packages
apt:
update_cache: true
name:
- nslcd
- libnss-ldapd
- libpam-ldapd
update_cache: true
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -5,6 +5,7 @@
dest: /etc/ssh/sshd_config
regexp: ^AllowGroups
line: AllowGroups root sudoldap aurore ssh
state: present
# To gain root access with ldap rights
- name: Install SUDO package
@ -21,6 +22,7 @@
dest: /etc/sudoers
regexp: ^%{{ sudo_group }}
line: "%{{ sudo_group }} ALL=(ALL:ALL) ALL"
state: present
# Set sudo location group
- name: Configure sudoers sudo location group
@ -28,4 +30,5 @@
dest: /etc/sudoers
regexp: ^%{{ sudo_group_location }}
line: "%{{ sudo_group_location }} ALL=(ALL:ALL) ALL"
state: present
when: sudo_group_location is defined

View file

@ -2,6 +2,7 @@
- name: Install mxisd
apt:
deb: "{{ mxisd_deb }}"
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -2,8 +2,9 @@
# Install HTTPS support for APT
- name: Install apt-transport-https
apt:
name: apt-transport-https
update_cache: true
name: apt-transport-https
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
@ -12,12 +13,14 @@
- name: Configure riot repository
apt_repository:
repo: deb https://riot.im/packages/debian/ {{ ansible_distribution_release }} main
state: present
# Add the key
- name: Configure the apt key
apt_key:
url: https://riot.im/packages/debian/repo-key.asc
id: E019645248E8F4A1
state: present
register: apt_key_result
retries: 3
until: apt_key_result is succeeded
@ -25,8 +28,9 @@
# Install riot
- name: Install riot-web
apt:
name: riot-web
update_cache: true
name: riot-web
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
@ -35,6 +39,7 @@
- name: Install nginx
apt:
name: nginx
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -1,8 +1,9 @@
---
- name: Install matrix-synapse
apt:
name: matrix-synapse
update_cache: true
name: matrix-synapse
state: present
default_release: stretch-backports
register: apt_result
retries: 3

View file

@ -4,8 +4,9 @@
# but also reduces the surface of attack
- name: Install NGINX server
apt:
name: nginx-light
update_cache: true
name: nginx-light
state: present
register: apt_result
retries: 3
until: apt_result is succeeded

View file

@ -10,11 +10,12 @@
- name: Install required packages
apt:
update_cache: true
name:
- nodejs
- npm
- build-essential # To build npm packages
update_cache: true
state: present
register: apt_result
retries: 3
until: apt_result is succeeded