gitlab-cy.yml

This commit is contained in:
s0dy 2018-11-18 15:03:14 +01:00
parent f626afdc85
commit f686b725be
2 changed files with 22 additions and 6 deletions

19
.ansible-ci.yml Normal file
View File

@ -0,0 +1,19 @@
- hosts: hifive
become: yes
become_user: root
tasks:
- name: Copy all files to web server
synchronize:
src: /builds/aviortheking/blog_imie/project/
dest: /var/www/html
rsync_opts:
- --exclude=.htaccess
- name: Change file ownership, group and mode
file:
path: /var/www/html
owner: gitlab
group: apache
mode: "u=rw,g=r,o=r"
recurse: yes

View File

@ -1,8 +1,6 @@
image: ansible/centos7-ansible
before_script:
#- which ssh-agent || ( apt-get update -qq -y && apt-get -q -y -o Dpkg::Use-Pty=0 install openssh-client )
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
@ -24,8 +22,7 @@ deploy_to_webserver:
- master
script:
#- mkdir /etc/ansible
- echo -e "$ANSIBLE_HIFIVE_HOSTS" > /etc/ansible/hosts
- ansible-playbook ops/ansible/httpd-centos.yml
- ansible-playbook ansible-ci.yml
when: manual