Compare commits

2 Commits

Author SHA1 Message Date
Gerben Geijteman
b563a9478a Fix typo 2018-09-03 20:55:16 +02:00
Gerben Geijteman
2e0fef1654 Optimize syntax 2018-09-03 20:40:10 +02:00
9 changed files with 159 additions and 157 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.idea

View File

@@ -12,18 +12,18 @@ addons:
- python-pip
install:
# Install ansible
- pip install ansible
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View File

@@ -15,138 +15,138 @@ directadmin_cache_timeout: 3600
# Packages - http://help.directadmin.com/item.php?id=354
directadmin_debian6_packages:
- gcc
- g++
- make
- flex
- bison
- openssl
- libssl-dev
- perl
- perl-base
- perl-modules
- libperl-dev
- libaio1
- libaio-dev
- zlib1g
- zlib1g-dev
- libcap-dev
- bzip2
- automake
- autoconf
- libtool
- cmake
- pkg-config
- python
- libreadline-dev
- libdb4.8-dev
- libsasl2-dev
- patch
- gcc
- g++
- make
- flex
- bison
- openssl
- libssl-dev
- perl
- perl-base
- perl-modules
- libperl-dev
- libaio1
- libaio-dev
- zlib1g
- zlib1g-dev
- libcap-dev
- bzip2
- automake
- autoconf
- libtool
- cmake
- pkg-config
- python
- libreadline-dev
- libdb4.8-dev
- libsasl2-dev
- patch
directadmin_debian7_packages:
- gcc
- g++
- make
- flex
- bison
- openssl
- libssl-dev
- perl
- perl-base
- perl-modules
- libperl-dev
- libaio1
- libaio-dev
- zlib1g
- zlib1g-dev
- libcap-dev
- bzip2
- automake
- autoconf
- libtool
- cmake
- pkg-config
- python
- libdb-dev
- libsasl2-dev
- libncurses5-dev
- patch
- gcc
- g++
- make
- flex
- bison
- openssl
- libssl-dev
- perl
- perl-base
- perl-modules
- libperl-dev
- libaio1
- libaio-dev
- zlib1g
- zlib1g-dev
- libcap-dev
- bzip2
- automake
- autoconf
- libtool
- cmake
- pkg-config
- python
- libdb-dev
- libsasl2-dev
- libncurses5-dev
- patch
directadmin_debian8_packages:
- gcc
- g++
- make
- flex
- bison
- openssl
- libssl-dev
- perl
- perl-base
- perl-modules
- libperl-dev
- libaio1
- libaio-dev
- zlib1g
- zlib1g-dev
- libcap-dev
- bzip2
- automake
- autoconf
- libtool
- cmake
- pkg-config
- python
- libdb-dev
- libsasl2-dev
- libncurses5-dev
- libsystemd-dev
- bind9
- quota
- libsystemd-daemon0
- patch
- libjemalloc-dev
- gcc
- g++
- make
- flex
- bison
- openssl
- libssl-dev
- perl
- perl-base
- perl-modules
- libperl-dev
- libaio1
- libaio-dev
- zlib1g
- zlib1g-dev
- libcap-dev
- bzip2
- automake
- autoconf
- libtool
- cmake
- pkg-config
- python
- libdb-dev
- libsasl2-dev
- libncurses5-dev
- libsystemd-dev
- bind9
- quota
- libsystemd-daemon0
- patch
- libjemalloc-dev
directadmin_rhel_generic_packages:
- gcc
- gcc-c++
- flex
- bison
- make
- bind
- bind-libs
- bind-utils
- openssl
- openssl-devel
- perl
- quota
- libaio
- libcom_err-devel
- libcurl-devel
- gd
- zlib-devel
- zip
- unzip
- libcap-devel
- cronie
- bzip2
- cyrus-sasl-devel
- perl-ExtUtils-Embed
- autoconf
- automake
- libtool
- which
- patch
- mailx
- bzip2-devel
- lsof
- gcc
- gcc-c++
- flex
- bison
- make
- bind
- bind-libs
- bind-utils
- openssl
- openssl-devel
- perl
- quota
- libaio
- libcom_err-devel
- libcurl-devel
- gd
- zlib-devel
- zip
- unzip
- libcap-devel
- cronie
- bzip2
- cyrus-sasl-devel
- perl-ExtUtils-Embed
- autoconf
- automake
- libtool
- which
- patch
- mailx
- bzip2-devel
- lsof
directadmin_rhel_packages:
- db4-devel
- db4-devel
directadmin_centos7_packages:
- psmisc
- net-tools
- systemd-devel
- libdb-devel
- perl-DBI
- xfsprogs
- psmisc
- net-tools
- systemd-devel
- libdb-devel
- perl-DBI
- xfsprogs

View File

@@ -1,3 +1,4 @@
---
galaxy_info:
author: Gerben Geijteman
description: Deploy DirectAdmin with Ansible
@@ -17,7 +18,7 @@ galaxy_info:
- squeeze
- wheezy
galaxy_tags:
- system
- web
- directadmin
- system
- web
- directadmin
dependencies: []

View File

@@ -6,7 +6,7 @@
cache_valid_time: "{{ directadmin_cache_timeout }}"
state: present
with_items:
- "{{ directadmin_debian6_packages }}"
- "{{ directadmin_debian6_packages }}"
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'squeeze'"
- name: Install dependencies for Debian 7 Wheezy
@@ -16,7 +16,7 @@
cache_valid_time: "{{ directadmin_cache_timeout }}"
state: present
with_items:
- "{{ directadmin_debian7_packages }}"
- "{{ directadmin_debian7_packages }}"
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'wheezy'"
- name: Install dependencies for Debian 8 Jessie
@@ -26,5 +26,5 @@
cache_valid_time: "{{ directadmin_cache_timeout }}"
state: present
with_items:
- "{{ directadmin_debian8_packages }}"
- "{{ directadmin_debian8_packages }}"
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"

View File

@@ -5,22 +5,22 @@
update_cache: yes
state: present
with_items:
- "{{ directadmin_rhel_packages_generic }}"
- "{{ directadmin_rhel_packages_generic }}"
- name: install everywhere but on CentOS7
yum:
yum:
name: "{{ item }}"
update_cache: yes
state: present
with_items:
- "{{ directadmin_rhel_packages }}"
- "{{ directadmin_rhel_packages }}"
when: ansible_distribution not 'CentOS' and ansible_distribution_version|version_compare('ne', 7)
- name: install CentOS 7 specific requirements
yum:
name: "{{ item }}"
update_cache: yes
update_cache: yes
state: present
with_items:
- "{{ directadmin_centos7_packages }}"
- "{{ directadmin_centos7_packages }}"
when: ansible_distribution == 'CentOS' and ansible_distribution_version|version_compare('=', 7)

View File

@@ -5,9 +5,9 @@
msg: "Variable: '{{ item }}' is not defined!"
when: "{{ item }} is undefined or {{ item }} is none"
with_items:
- directadmin_client_id
- directadmin_license_id
- directadmin_hostname
- directadmin_client_id
- directadmin_license_id
- directadmin_hostname
# Ensure prerequisites are installed for supported OS
- include: prerequisites-Debian.yml

View File

@@ -26,16 +26,16 @@
when: da_present.status == 200
- block:
- name: ensure directadmin path if remote options file is used
file:
path: "{{ directadmin_custombuild_path }}"
recurse: yes
state: directory
- name: ensure directadmin path if remote options file is used
file:
path: "{{ directadmin_custombuild_path }}"
recurse: yes
state: directory
- name: try remote custombuild options file
get_url:
url: "{{ directadmin_custombuild_options_conf }}"
dest: "{{ directadmin_custombuild_path }}/options.conf"
- name: try remote custombuild options file
get_url:
url: "{{ directadmin_custombuild_options_conf }}"
dest: "{{ directadmin_custombuild_path }}/options.conf"
when: directadmin_custombuild_options_conf is defined and directadmin_custombuild_options_conf is not none

View File

@@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- ansible-directadmin
- ansible-directadmin