Coder Social home page Coder Social logo

ansible-role-gitlab-in-docker's People

Contributors

lexa-uw avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ansible-role-gitlab-in-docker's Issues

Unable to deploy following README.md

Probably worth moving the defaults/main.yml values which are stacked (e.g. gitlab_container.image) into standalone variables (gitlab_container_image) and then in the tasks/main.yml use variables like this:

- name: Run GitLab
  register: gitlab
  docker_container:
    image: "{{gitlab_container.image | default(gitlab_container_image) }}"
    links: "{{gitlab_container.links | default(gitlab_container_links) }}"
    name: "{{gitlab_container.name | default(gitlab_container_name) }}"
    ports: "{{gitlab_container.ports | default(gitlab_container_ports) }}"
    pull: yes
    recreate: "{{gitlab_container.recreate | default(gitlab_container_recreate) }}"
    restart: "{{gitlab_container.restart | default(gitlab_container_restart) }}"
    restart_policy: "{{gitlab_container.restart_policy | default(gitlab_container_restart_policy) }}"
    state: started
    volumes: "{{gitlab_container.volumes | default(gitlab_container_volumes) }}"

Result of play:

fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'recreate'\n\nThe error appears to have been in '/root/gitlab/roles/gitlab/tasks/main.yml': line 10, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Run GitLab\n  ^ here\n"}

vars/main.yml:

gitlab_dir: "/tmp/gitlab"
gitlab_container_check_url: "http://{{ hostname }}:80"
gitlab_container_check_retries: 10
gitlab_container_check_delay: 15
gitlab_container:
  image: "gitlab/gitlab-ce:10.6.2-ce.0"
  name: "gitlab_{{hostname}}"
  links:
    - "mailserver:mail"
  ports:
    - "{{ansible_default_ipv4.address}}:443:443"
    - "{{ansible_default_ipv4.address}}:80:80"
    - "{{ansible_default_ipv4.address}}:22:22"
  volumes:
    - "{{gitlab_dir}}/mnt/etc/gitlab:/etc/gitlab"              # configs
    - "{{gitlab_dir}}/mnt/var/opt/gitlab:/var/opt/gitlab"      # data
    - "{{gitlab_dir}}/mnt/var/log/gitlab:/var/log/gitlab"      # logs

gitlab_config: |
  external_url 'https://{{hostname}}'

  gitlab_rails['smtp_enable'] = false

Test site.yml:

---
- hosts: localhost
  tasks:
  - name: Get my public IP
    ipify_facts:
    register: public_ip

  - name: Set the hostname as a xip.io
    set_fact:
      hostname: "gitlab.{{ public_ip.ansible_facts.ipify_public_ip }}.xip.io"

  - name: Include variables
    include_vars: vars/main.yml

  - name: Load the gitlab role
    include_role:
      name: gitlab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.