From 47a274f5eceacce0180cc5e63200cadaeedc60ac Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 14:49:39 +0100 Subject: [PATCH 01/15] Testing CI with Gitlab --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..58586d6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,3 @@ +job1: + script: "echo hello world" + From 388d1b30f67c736a079f0d356a8778e604b64412 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 16:34:12 +0100 Subject: [PATCH 02/15] Trying to use Gitlab CI to test the playbook via Docker --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58586d6..d652d86 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,3 @@ job1: - script: "echo hello world" + script: "ansible-playbook ispmail.yml" From 82d1bece9063d7663e1f7d4c46360cdc6b9b5441 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 17:01:27 +0100 Subject: [PATCH 03/15] Yet another gitlab ci attempt --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d652d86..84cae0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,10 @@ +image: debian:8 + +#before_script: + +install: + - pip install ansible + job1: script: "ansible-playbook ispmail.yml" From f5ce3348d4eff424d4863db138966515bcaeb6c0 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 17:02:59 +0100 Subject: [PATCH 04/15] Yet another... --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84cae0a..482ba65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,6 @@ image: debian:8 -#before_script: - -install: +before_script: - pip install ansible job1: From e89a7949c9e3e1785d2bf9cfd31aa4e4a9edac3e Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 17:05:29 +0100 Subject: [PATCH 05/15] Yet another another... --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 482ba65..1c64f71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,8 @@ image: debian:8 before_script: + - apt-get update -qy + - apt-get install -y python-pip - pip install ansible job1: From 07d2c56b804af81c2d44f3b9df4de918508e955d Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 17:31:42 +0100 Subject: [PATCH 06/15] Yet... --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c64f71..bbe59d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: debian:8 before_script: - apt-get update -qy - - apt-get install -y python-pip + - apt-get install -y python-dev python-pip - pip install ansible job1: From b511a2e39a8e0103ceb3c2483b247a361ca77443 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 18:13:14 +0100 Subject: [PATCH 07/15] Yet... --- .gitlab-ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bbe59d9..dd7ffbf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,15 @@ image: debian:8 -before_script: - - apt-get update -qy - - apt-get install -y python-dev python-pip - - pip install ansible +services: + - ansible + +#before_script: +# - apt-get update -qy +# - apt-get install -y python-dev python-pip +# - pip install ansible + +variables: + HOSTNAME: default.example.org job1: script: "ansible-playbook ispmail.yml" From cbd23533dfdb80fa924f944ede033f7a2d26d7dd Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 18:16:28 +0100 Subject: [PATCH 08/15] Trying to CI build against williamyeh/ansible:debian8 image --- .gitlab-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd7ffbf..8063f28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,4 @@ -image: debian:8 - -services: - - ansible +image: williamyeh/ansible:debian8 #before_script: # - apt-get update -qy From 7ae84b8eaa2d498f103a69f96311d553b11eb544 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 18:26:06 +0100 Subject: [PATCH 09/15] Yet... trying to install via Ansible locally --- .gitlab-ci.yml | 5 ----- hosts | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8063f28..65410bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,5 @@ image: williamyeh/ansible:debian8 -#before_script: -# - apt-get update -qy -# - apt-get install -y python-dev python-pip -# - pip install ansible - variables: HOSTNAME: default.example.org diff --git a/hosts b/hosts index 3a7daa1..6ddcb12 100644 --- a/hosts +++ b/hosts @@ -1,2 +1,3 @@ default +localhost ansible_connection=local From e452434906a6f37726069f0acb4a7b5de3efb760 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 18:27:29 +0100 Subject: [PATCH 10/15] Yet... using localhost properly. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65410bc..9a9212b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,5 +4,5 @@ variables: HOSTNAME: default.example.org job1: - script: "ansible-playbook ispmail.yml" + script: "ansible-playbook ispmail.yml -l localhost" From f342f5f406857dcaceba893863a59fe339d1fd24 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 18:51:07 +0100 Subject: [PATCH 11/15] make sure mysql-server is started --- roles/ispmail-packages/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/ispmail-packages/tasks/main.yml b/roles/ispmail-packages/tasks/main.yml index d217fc3..ab9f2d7 100644 --- a/roles/ispmail-packages/tasks/main.yml +++ b/roles/ispmail-packages/tasks/main.yml @@ -22,3 +22,6 @@ - exim4-config - exim4-daemon-light +- name: make sure mysql-server is started + service: name=mysql-server enabled=yes state=started + From 244dfa4fc295c2072be406c912aaa35369b6d0d5 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 18:52:52 +0100 Subject: [PATCH 12/15] Fix misspelled mysql service name --- roles/ispmail-packages/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ispmail-packages/tasks/main.yml b/roles/ispmail-packages/tasks/main.yml index ab9f2d7..a5a458f 100644 --- a/roles/ispmail-packages/tasks/main.yml +++ b/roles/ispmail-packages/tasks/main.yml @@ -23,5 +23,5 @@ - exim4-daemon-light - name: make sure mysql-server is started - service: name=mysql-server enabled=yes state=started + service: name=mysql enabled=yes state=started From 5dd0c18e04f76b30cb45eb3bb63c83de4021d794 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 19:02:22 +0100 Subject: [PATCH 13/15] Make sure 'patch' is installed to succeed CI tests --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a9212b..96ca14f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,9 @@ image: williamyeh/ansible:debian8 +before_script: + - apt-get update + - apt-get -y install patch + variables: HOSTNAME: default.example.org From 894280ce6e3617bc5b0659c4aee6ffcb40387a89 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 19:04:27 +0100 Subject: [PATCH 14/15] Move installation of 'patch' package into the actual role --- .gitlab-ci.yml | 4 ---- roles/ispmail-packages/tasks/main.yml | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96ca14f..9a9212b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,5 @@ image: williamyeh/ansible:debian8 -before_script: - - apt-get update - - apt-get -y install patch - variables: HOSTNAME: default.example.org diff --git a/roles/ispmail-packages/tasks/main.yml b/roles/ispmail-packages/tasks/main.yml index a5a458f..c252ab9 100644 --- a/roles/ispmail-packages/tasks/main.yml +++ b/roles/ispmail-packages/tasks/main.yml @@ -14,6 +14,7 @@ - spamass-milter - spamassassin - pwgen + - patch - name: purge Exim installation apt: name={{item}} state=absent purge=yes with_items: From c5007cabcd5c04dbf21a8e639c12b875aeee2ec1 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 29 Nov 2015 21:27:13 +0100 Subject: [PATCH 15/15] Removed pointless HOSTNAME variable --- .gitlab-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a9212b..43deda7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,5 @@ image: williamyeh/ansible:debian8 -variables: - HOSTNAME: default.example.org - job1: script: "ansible-playbook ispmail.yml -l localhost"