mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-04-23 19:32:15 +00:00
gitlab-cy.yml
This commit is contained in:
parent
f626afdc85
commit
f686b725be
19
.ansible-ci.yml
Normal file
19
.ansible-ci.yml
Normal 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
|
@ -1,8 +1,6 @@
|
|||||||
image: ansible/centos7-ansible
|
image: ansible/centos7-ansible
|
||||||
|
|
||||||
before_script:
|
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)
|
# Run ssh-agent (inside the build environment)
|
||||||
- eval $(ssh-agent -s)
|
- eval $(ssh-agent -s)
|
||||||
|
|
||||||
@ -24,8 +22,7 @@ deploy_to_webserver:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
script:
|
script:
|
||||||
#- mkdir /etc/ansible
|
|
||||||
- echo -e "$ANSIBLE_HIFIVE_HOSTS" > /etc/ansible/hosts
|
- echo -e "$ANSIBLE_HIFIVE_HOSTS" > /etc/ansible/hosts
|
||||||
- ansible-playbook ops/ansible/httpd-centos.yml
|
- ansible-playbook ansible-ci.yml
|
||||||
|
|
||||||
when: manual
|
when: manual
|
Loading…
x
Reference in New Issue
Block a user