Commit 9b2f3874 authored by Aleksey Shirokih's avatar Aleksey Shirokih

Merge branch 'ansible_27' into 'microservices'

Ansible 2.7 integration

See merge request !37
parents fb6ff091 22e17afe
Pipeline #9468 failed with stages
in 54 minutes and 36 seconds
......@@ -16,140 +16,81 @@ lint:
tags:
- docker
build_centos:
.base_builder: &base_builder
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/yum
script:
image: registry.getnoc.com/infrastructure/molecule-docker:master
before_script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s default
script:
- molecule test -s $SCENARIO_NAME
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
only:
- branches@noc/ansible_deploy
- master@noc/ansible_deploy
build_centos:
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/yum
SCENARIO_NAME: default
<<: *base_builder
build_debian8:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/apt/archives
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s debian8
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
SCENARIO_NAME: debian8
<<: *base_builder
build_debian9:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/apt/archives
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s debian9
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
SCENARIO_NAME: debian9
<<: *base_builder
build_ubuntu16:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/apt/archives
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s ubuntu16
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
SCENARIO_NAME: ubuntu16
<<: *base_builder
build_ubuntu18:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/apt/archives
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s ubuntu18
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
allow_failure: true
SCENARIO_NAME: ubuntu18
<<: *base_builder
allow_failure: true # lack of mongodb 3.6 support.
build_freebsd:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/pkg
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s freebsd
tags:
- docker
cache:
paths:
- /tmp/dist
SCENARIO_NAME: freebsd
USE_CACHE: "False" # freebsd minio-client "broken"
<<: *base_builder
allow_failure: true # to hard to maintain without maintainer. often incompatible changes
build_rhel:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/yum
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s rhel
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
allow_failure: true
SCENARIO_NAME: rhel
<<: *base_builder
allow_failure: true # should be fixed. with additional role for registration
build_oel7:
stage: build
image: registry.getnoc.com/infrastructure/molecule-docker:ansible_2_6_5
variables:
PIP_CACHE: /root/.cache/pip
PKG_CACHE: /var/cache/yum
script:
- echo ${ssh_identity_text} | tr -d ' ' | base64 -d > /tmp/temporary_ssh_key
- chmod 0400 /tmp/temporary_ssh_key
- molecule test -s oel7
tags:
- docker
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- /tmp/dist
allow_failure: true
SCENARIO_NAME: oel7
<<: *base_builder
allow_failure: true # no active users for platform
......@@ -17,9 +17,18 @@
vars:
ansible_python_interpreter: /usr/bin/python
- name: update pkg
pkgng:
name: pkg
state: latest
environment:
IGNORE_OSVERSION: "yes"
- name: install minio client
pkgng:
name: minio-client
environment:
IGNORE_OSVERSION: "yes"
- name: config cache url
command: "minio-client config host add myminio {{ minio_url }} {{minio_key}} {{minio_secret}}"
......
---
- name: Install CentOS system packages
yum:
name: "{{ item }}"
name: "{{ packages }}"
update_cache: "True"
with_items:
- libssh2
- libssh2-devel
vars:
packages:
- libssh2
- libssh2-devel
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
---
- name: Install Debian system packages
apt:
name: "{{item}}"
name: "{{ packages }}"
update_cache: "True"
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
with_items:
- libssh2-1
- libssh2-1-dev
vars:
packages:
- libssh2-1
- libssh2-1-dev
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
---
- name: Install OEL system packages
yum:
name: "{{ item }}"
name: "{{ packages }}"
update_cache: "True"
with_items:
- libssh2
- libssh2-devel
vars:
packages:
- libssh2
- libssh2-devel
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
---
- name: Install RedHat system packages
yum:
name: "{{item}}"
name: "{{ packages }}"
update_cache: "True"
with_items:
- libssh2
- libssh2-devel
vars:
packages:
- libssh2
- libssh2-devel
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
---
- name: Install Ubuntu system packages
apt:
name: "{{item}}"
name: "{{ packages }}"
update_cache: "True"
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
with_items:
- libssh2-1
- libssh2-1-dev
vars:
packages:
- libssh2-1
- libssh2-1-dev
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
......@@ -7,7 +7,6 @@
- block:
- name: Clone NOC
command: git clone "{{noc_repo}}" "{{noc_root}}"
creates: "{{noc_root}}/.git"
environment:
https_proxy: "{{http_proxy}}"
......
......@@ -15,11 +15,13 @@
- name: Install CentOS system packages 1/2
yum:
name: "{{ item }}"
name: "{{ packages }}"
state: present
update_cache: "False"
with_items:
- epel-release
update_cache: "True"
become: "True"
vars:
packages:
- epel-release
environment:
https_proxy: "{{ http_proxy }}"
http_proxy: "{{ http_proxy }}"
......@@ -28,24 +30,25 @@
- name: Install CentOS system packages 2/2
yum:
name: "{{ item }}"
name: "{{ packages }}"
state: present
update_cache: "True"
with_items:
- git
- patch
- python-virtualenv
- gcc
- postgresql{{ postgres_version|replace(".","") }}
- postgresql-devel
- postgresql{{ postgres_version|replace(".","") }}-devel
- libffi
- libffi-devel
- libmemcached
- libmemcached-devel
- zlib-devel
- jemalloc
- bzip2
vars:
packages:
- git
- patch
- python-virtualenv
- gcc
- postgresql{{ postgres_version|replace(".","") }}
- postgresql-devel
- postgresql{{ postgres_version|replace(".","") }}-devel
- libffi
- libffi-devel
- libmemcached
- libmemcached-devel
- zlib-devel
- jemalloc
- bzip2
environment:
https_proxy: "{{ http_proxy }}"
http_proxy: "{{ http_proxy }}"
......
---
- name: Install Debian system packages
apt:
name: "{{item}}"
name: "{{ packages }}"
update_cache: "True"
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
with_items:
- python
- python-dev
- python-virtualenv
- git
- libjemalloc1
- gcc
- libpq-dev
- libffi6
- libffi-dev
- libmemcached11
- libmemcached-dev
- zlib1g-dev
- patch
- bzip2
vars:
packages:
- python
- python-dev
- python-virtualenv
- git
- libjemalloc1
- gcc
- libpq-dev
- libffi6
- libffi-dev
- libmemcached11
- libmemcached-dev
- zlib1g-dev
- patch
- bzip2
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
---
- name: Install FreeBSD system packages
pkgng:
name: "{{item}}"
name: "{{ packages }}"
state: present
with_items:
- postgresql{{postgres_version|replace(".","")}}-client
- python2
- py27-virtualenv
- curl
- libffi
- libmemcached
- git
- zstd
vars:
packages:
- postgresql{{postgres_version|replace(".","")}}-client
- python2
- py27-virtualenv
- curl
- libffi
- libmemcached
- git
- zstd
tags:
- requirements
......
......@@ -47,24 +47,25 @@
- name: Install OEL system packages
yum:
name: "{{ item }}"
name: "{{ packages }}"
state: present
update_cache: "True"
with_items:
- git
- patch
- python-virtualenv
- gcc
- postgresql{{ postgres_version|replace(".","") }}
- postgresql-devel
- postgresql{{ postgres_version|replace(".","") }}-devel
- libffi
- libffi-devel
- libmemcached
- libmemcached-devel
- zlib-devel
- jemalloc
- bzip2
vars:
packages:
- git
- patch
- python-virtualenv
- gcc
- postgresql{{ postgres_version|replace(".","") }}
- postgresql-devel
- postgresql{{ postgres_version|replace(".","") }}-devel
- libffi
- libffi-devel
- libmemcached
- libmemcached-devel
- zlib-devel
- jemalloc
- bzip2
environment:
https_proxy: "{{ http_proxy }}"
http_proxy: "{{ http_proxy }}"
......
......@@ -36,21 +36,22 @@
- name: Install RedHat system packages 1/2
yum:
name: "{{item}}"
name: "{{ packages }}"
state: present
update_cache: "True"
with_items:
- git
- python-virtualenv
- gcc
- postgresql{{postgres_version|replace(".","")}}
- postgresql{{postgres_version|replace(".","")}}-devel
- patch
- libffi
- libffi-devel
- libmemcached
- zlib-devel
- bzip2
vars:
packages:
- git
- python-virtualenv
- gcc
- postgresql{{postgres_version|replace(".","")}}
- postgresql{{postgres_version|replace(".","")}}-devel
- patch
- libffi
- libffi-devel
- libmemcached
- zlib-devel
- bzip2
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......@@ -59,11 +60,12 @@
- name: Install RedHat system packages 2/2
yum:
name: "{{item}}"
name: "{{ packages }}"
state: present
with_items:
- jemalloc
- libmemcached-devel
vars:
packages:
- jemalloc
- libmemcached-devel
environment:
http_proxy: "{{http_proxy}}"
......
---
- name: Install Ubuntu system packages
apt:
name: "{{ item }}"
name: "{{ packages }}"
update_cache: "True"
cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}"
with_items:
- python
- python-dev
- python-virtualenv
- git
- libjemalloc1
- gcc
- libpq-dev
- libffi6
- libffi-dev
- libmemcached11
- libmemcached-dev
- patch
- bzip2
- zlib1g-dev
vars:
packages:
- python
- python-dev
- python-virtualenv
- git
- libjemalloc1
- gcc
- libpq-dev
- libffi6
- libffi-dev
- libmemcached11
- libmemcached-dev
- patch
- bzip2
- zlib1g-dev
environment:
https_proxy: "{{ http_proxy }}"
http_proxy: "{{ http_proxy }}"
......
......@@ -7,6 +7,7 @@
become: "True"
when:
- http_proxy is defined
- http_proxy
tags:
- config
......@@ -18,16 +19,17 @@
- name: Install CentOS system packages pre
yum:
name: "{{ item }}"
name: "{{ packages }}"
state: present
update_cache: "True"
become: "True"
with_items:
- unzip
- ca-certificates
vars:
packages:
- unzip
- ca-certificates
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
https_proxy: "{{ http_proxy }}"
http_proxy: "{{ http_proxy }}"
tags:
- requirements
......
---
- name: Install Debian system packages
apt:
name: "{{item}}"
name: "{{ packages }}"
update_cache: "True"
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
with_items:
- ca-certificates
- unzip
- sudo
- curl
- apt-transport-https
- dbus # to setup hostname
vars:
packages:
- ca-certificates
- unzip
- sudo
- curl
- apt-transport-https
- dbus # to setup hostname
become: "True"
environment:
https_proxy: "{{http_proxy}}"
......
......@@ -8,17 +8,26 @@
tags:
- config
- name: Force upgrade catalog
become: "True"
command: pkg update -f
environment:
IGNORE_OSVERSION: "yes"
when:
- molecule_yml is defined
- name: Install FreeBSD system packages
pkgng:
name: "{{item}}"
name: "{{ packages }}"
state: present
become: "True"
with_items:
- ca_root_nss
- sudo
- curl
- unzip
- gtar
vars:
packages:
- ca_root_nss
- sudo
- curl
- unzip
- gtar
tags:
- requirements
......
......@@ -7,6 +7,7 @@
become: "True"
when:
- http_proxy is defined
- http_proxy
tags:
- config
......@@ -18,13 +19,14 @@
- name: Install CentOS system packages pre
yum:
name: "{{ item }}"
name: "{{ packages }}"
state: present
update_cache: "True"
become: "True"
with_items:
- unzip
- ca-certificates
vars:
packages:
- unzip
- ca-certificates
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
......@@ -6,6 +6,7 @@
line: "proxy={{ http_proxy }}"
when:
- http_proxy is defined
- http_proxy
become: "True"
tags:
- config
......@@ -29,12 +30,13 @@
- name: Install Rhel system packages pre
become: "True"
yum:
name: "{{ item }}"
name: "{{ packages }}"
state: present
update_cache: "True"
with_items:
- unzip
- ca-certificates
vars:
packages:
- unzip
- ca-certificates
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
......@@ -2,16 +2,17 @@
- name: Install Ubuntu system packages
become: "True"
apt:
name: "{{item}}"
name: "{{ packages }}"
update_cache: "True"
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
with_items:
- ca-certificates
- unzip
- sudo
- curl
- apt-transport-https
- dbus # to setup hostname
vars:
packages:
- ca-certificates
- unzip