You've already forked ansible-directadmin
Optimize syntax
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.idea
|
||||||
16
.travis.yml
16
.travis.yml
@@ -12,18 +12,18 @@ addons:
|
|||||||
- python-pip
|
- python-pip
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install ansible
|
# Install ansible
|
||||||
- pip install ansible
|
- pip install ansible
|
||||||
|
|
||||||
# Check ansible version
|
# Check ansible version
|
||||||
- ansible --version
|
- ansible --version
|
||||||
|
|
||||||
# Create ansible.cfg with correct roles_path
|
# Create ansible.cfg with correct roles_path
|
||||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Basic role syntax check
|
# Basic role syntax check
|
||||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||||
@@ -15,138 +15,138 @@ directadmin_cache_timeout: 3600
|
|||||||
|
|
||||||
# Packages - http://help.directadmin.com/item.php?id=354
|
# Packages - http://help.directadmin.com/item.php?id=354
|
||||||
directadmin_debian6_packages:
|
directadmin_debian6_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- g++
|
- g++
|
||||||
- make
|
- make
|
||||||
- flex
|
- flex
|
||||||
- bison
|
- bison
|
||||||
- openssl
|
- openssl
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- perl
|
- perl
|
||||||
- perl-base
|
- perl-base
|
||||||
- perl-modules
|
- perl-modules
|
||||||
- libperl-dev
|
- libperl-dev
|
||||||
- libaio1
|
- libaio1
|
||||||
- libaio-dev
|
- libaio-dev
|
||||||
- zlib1g
|
- zlib1g
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
- libcap-dev
|
- libcap-dev
|
||||||
- bzip2
|
- bzip2
|
||||||
- automake
|
- automake
|
||||||
- autoconf
|
- autoconf
|
||||||
- libtool
|
- libtool
|
||||||
- cmake
|
- cmake
|
||||||
- pkg-config
|
- pkg-config
|
||||||
- python
|
- python
|
||||||
- libreadline-dev
|
- libreadline-dev
|
||||||
- libdb4.8-dev
|
- libdb4.8-dev
|
||||||
- libsasl2-dev
|
- libsasl2-dev
|
||||||
- patch
|
- patch
|
||||||
|
|
||||||
directadmin_debian7_packages:
|
directadmin_debian7_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- g++
|
- g++
|
||||||
- make
|
- make
|
||||||
- flex
|
- flex
|
||||||
- bison
|
- bison
|
||||||
- openssl
|
- openssl
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- perl
|
- perl
|
||||||
- perl-base
|
- perl-base
|
||||||
- perl-modules
|
- perl-modules
|
||||||
- libperl-dev
|
- libperl-dev
|
||||||
- libaio1
|
- libaio1
|
||||||
- libaio-dev
|
- libaio-dev
|
||||||
- zlib1g
|
- zlib1g
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
- libcap-dev
|
- libcap-dev
|
||||||
- bzip2
|
- bzip2
|
||||||
- automake
|
- automake
|
||||||
- autoconf
|
- autoconf
|
||||||
- libtool
|
- libtool
|
||||||
- cmake
|
- cmake
|
||||||
- pkg-config
|
- pkg-config
|
||||||
- python
|
- python
|
||||||
- libdb-dev
|
- libdb-dev
|
||||||
- libsasl2-dev
|
- libsasl2-dev
|
||||||
- libncurses5-dev
|
- libncurses5-dev
|
||||||
- patch
|
- patch
|
||||||
|
|
||||||
directadmin_debian8_packages:
|
directadmin_debian8_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- g++
|
- g++
|
||||||
- make
|
- make
|
||||||
- flex
|
- flex
|
||||||
- bison
|
- bison
|
||||||
- openssl
|
- openssl
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- perl
|
- perl
|
||||||
- perl-base
|
- perl-base
|
||||||
- perl-modules
|
- perl-modules
|
||||||
- libperl-dev
|
- libperl-dev
|
||||||
- libaio1
|
- libaio1
|
||||||
- libaio-dev
|
- libaio-dev
|
||||||
- zlib1g
|
- zlib1g
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
- libcap-dev
|
- libcap-dev
|
||||||
- bzip2
|
- bzip2
|
||||||
- automake
|
- automake
|
||||||
- autoconf
|
- autoconf
|
||||||
- libtool
|
- libtool
|
||||||
- cmake
|
- cmake
|
||||||
- pkg-config
|
- pkg-config
|
||||||
- python
|
- python
|
||||||
- libdb-dev
|
- libdb-dev
|
||||||
- libsasl2-dev
|
- libsasl2-dev
|
||||||
- libncurses5-dev
|
- libncurses5-dev
|
||||||
- libsystemd-dev
|
- libsystemd-dev
|
||||||
- bind9
|
- bind9
|
||||||
- quota
|
- quota
|
||||||
- libsystemd-daemon0
|
- libsystemd-daemon0
|
||||||
- patch
|
- patch
|
||||||
- libjemalloc-dev
|
- libjemalloc-dev
|
||||||
|
|
||||||
directadmin_rhel_generic_packages:
|
directadmin_rhel_generic_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- gcc-c++
|
- gcc-c++
|
||||||
- flex
|
- flex
|
||||||
- bison
|
- bison
|
||||||
- make
|
- make
|
||||||
- bind
|
- bind
|
||||||
- bind-libs
|
- bind-libs
|
||||||
- bind-utils
|
- bind-utils
|
||||||
- openssl
|
- openssl
|
||||||
- openssl-devel
|
- openssl-devel
|
||||||
- perl
|
- perl
|
||||||
- quota
|
- quota
|
||||||
- libaio
|
- libaio
|
||||||
- libcom_err-devel
|
- libcom_err-devel
|
||||||
- libcurl-devel
|
- libcurl-devel
|
||||||
- gd
|
- gd
|
||||||
- zlib-devel
|
- zlib-devel
|
||||||
- zip
|
- zip
|
||||||
- unzip
|
- unzip
|
||||||
- libcap-devel
|
- libcap-devel
|
||||||
- cronie
|
- cronie
|
||||||
- bzip2
|
- bzip2
|
||||||
- cyrus-sasl-devel
|
- cyrus-sasl-devel
|
||||||
- perl-ExtUtils-Embed
|
- perl-ExtUtils-Embed
|
||||||
- autoconf
|
- autoconf
|
||||||
- automake
|
- automake
|
||||||
- libtool
|
- libtool
|
||||||
- which
|
- which
|
||||||
- patch
|
- patch
|
||||||
- mailx
|
- mailx
|
||||||
- bzip2-devel
|
- bzip2-devel
|
||||||
- lsof
|
- lsof
|
||||||
|
|
||||||
directadmin_rhel_packages:
|
directadmin_rhel_packages:
|
||||||
- db4-devel
|
- db4-devel
|
||||||
|
|
||||||
directadmin_centos7_packages:
|
directadmin_centos7_packages:
|
||||||
- psmisc
|
- psmisc
|
||||||
- net-tools
|
- net-tools
|
||||||
- systemd-devel
|
- systemd-devel
|
||||||
- libdb-devel
|
- libdb-devel
|
||||||
- perl-DBI
|
- perl-DBI
|
||||||
- xfsprogs
|
- xfsprogs
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Gerben Geijteman
|
author: Gerben Geijteman
|
||||||
description: Deploy DirectAdmin with Ansible
|
description: Deploy DirectAdmin with Ansible
|
||||||
@@ -17,7 +18,7 @@ galaxy_info:
|
|||||||
- squeeze
|
- squeeze
|
||||||
- wheezy
|
- wheezy
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- system
|
- system
|
||||||
- web
|
- web
|
||||||
- directadmin
|
- directadmin
|
||||||
dependencies: []
|
dependencies: []
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
cache_valid_time: "{{ directadmin_cache_timeout }}"
|
cache_valid_time: "{{ directadmin_cache_timeout }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ directadmin_debian6_packages }}"
|
- "{{ directadmin_debian6_packages }}"
|
||||||
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'squeeze'"
|
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'squeeze'"
|
||||||
|
|
||||||
- name: Install dependencies for Debian 7 Wheezy
|
- name: Install dependencies for Debian 7 Wheezy
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
cache_valid_time: "{{ directadmin_cache_timeout }}"
|
cache_valid_time: "{{ directadmin_cache_timeout }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ directadmin_debian7_packages }}"
|
- "{{ directadmin_debian7_packages }}"
|
||||||
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'wheezy'"
|
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'wheezy'"
|
||||||
|
|
||||||
- name: Install dependencies for Debian 8 Jessie
|
- name: Install dependencies for Debian 8 Jessie
|
||||||
@@ -26,5 +26,5 @@
|
|||||||
cache_valid_time: "{{ directadmin_cache_timeout }}"
|
cache_valid_time: "{{ directadmin_cache_timeout }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ directadmin_debian8_packages }}"
|
- "{{ directadmin_debian8_packages }}"
|
||||||
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"
|
when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"
|
||||||
|
|||||||
@@ -5,22 +5,22 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ directadmin_rhel_packages_generic }}"
|
- "{{ directadmin_rhel_packages_generic }}"
|
||||||
|
|
||||||
- name: install everywhere but on CentOS7
|
- name: install everywhere but on CentOS7
|
||||||
yum:
|
yum:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ directadmin_rhel_packages }}"
|
- "{{ directadmin_rhel_packages }}"
|
||||||
when: ansible_distribution not 'CentOS' and ansible_distribution_version|version_compare('ne', 7)
|
when: ansible_distribution not 'CentOS' and ansible_distribution_version|version_compare('ne', 7)
|
||||||
|
|
||||||
- name: install CentOS 7 specific requirements
|
- name: install CentOS 7 specific requirements
|
||||||
yum:
|
yum:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ directadmin_centos7_packages }}"
|
- "{{ directadmin_centos7_packages }}"
|
||||||
when: ansible_distribution == 'CentOS' and ansible_distribution_version|version_compare('=', 7)
|
when: ansible_distribution == 'CentOS' and ansible_distribution_version|version_compare('=', 7)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
msg: "Variable: '{{ item }}' is not defined!"
|
msg: "Variable: '{{ item }}' is not defined!"
|
||||||
when: "{{ item }} is undefined or {{ item }} is none"
|
when: "{{ item }} is undefined or {{ item }} is none"
|
||||||
with_items:
|
with_items:
|
||||||
- directadmin_client_id
|
- directadmin_client_id
|
||||||
- directadmin_license_id
|
- directadmin_license_id
|
||||||
- directadmin_hostname
|
- directadmin_hostname
|
||||||
|
|
||||||
# Ensure prerequisites are installed for supported OS
|
# Ensure prerequisites are installed for supported OS
|
||||||
- include: prerequisites-Debian.yml
|
- include: prerequisites-Debian.yml
|
||||||
|
|||||||
@@ -26,16 +26,16 @@
|
|||||||
when: da_present.status == 200
|
when: da_present.status == 200
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: ensure directadmin path if remote options file is used
|
- name: ensure directadmin path if remote options file is used
|
||||||
file:
|
file:
|
||||||
path: "{{ directadmin_custombuild_path }}"
|
path: "{{ directadmin_custombuild_path }}"
|
||||||
recurse: yes
|
recurse: yes
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: try remote custombuild options file
|
- name: try remote custombuild options file
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ directadmin_custombuild_options_conf }}"
|
url: "{{ directadmin_custombuild_options_conf }}"
|
||||||
dest: "{{ directadmin_custombuild_path }}/options.conf"
|
dest: "{{ directadmin_custombuild_path }}/options.conf"
|
||||||
|
|
||||||
when: directadmin_custombuild_options_conf is defined and directadmin_custombuild_options_conf is not none
|
when: directadmin_custombuild_options_conf is defined and directadmin_custombuild_options_conf is not none
|
||||||
|
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
remote_user: root
|
remote_user: root
|
||||||
roles:
|
roles:
|
||||||
- ansible-directadmin
|
- ansible-directadmin
|
||||||
Reference in New Issue
Block a user