Skip to content
Snippets Groups Projects
Commit ad8de6f2 authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

add offline deployment mode | fixes #31856

parent 2a27b91a
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ __pycache__/ ...@@ -9,6 +9,7 @@ __pycache__/
inventories/* inventories/*
!inventories/example !inventories/example
!inventories/local* !inventories/local*
!inventories/offline*
inventories/local*/host_vars/localhost.yml inventories/local*/host_vars/localhost.yml
playbooks/_* playbooks/_*
roles/_* roles/_*
......
---
offline_mode: true
...
localhost ansible_connection=local
[msmonitor]
localhost
[postgres]
localhost
[mirismanager]
localhost
[mediaserver]
localhost
;[wowza]
;localhost
[celerity]
localhost
[mediaimport]
localhost
; vim:ft=dosini
---
offline_mode: true
...
localhost ansible_connection=local
[mediaworker]
localhost
; vim:ft=dosini
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
name: "{{ conf_req_packages }}" name: "{{ conf_req_packages }}"
- name: clone envsetup repository - name: clone envsetup repository
when: not offline_mode | d(false)
ignore_errors: true ignore_errors: true
register: conf_clone register: conf_clone
git: git:
...@@ -22,7 +23,9 @@ ...@@ -22,7 +23,9 @@
dest: "{{ conf_repo_dest }}" dest: "{{ conf_repo_dest }}"
- name: ask to continue - name: ask to continue
when: conf_clone is failed when:
- not offline_mode | d(false)
- conf_clone is failed
pause: pause:
prompt: "Previous task failed, it may be normal if you have local changes in the commited files, do you want to continue anyway?" prompt: "Previous task failed, it may be normal if you have local changes in the commited files, do you want to continue anyway?"
seconds: 30 seconds: 30
...@@ -110,7 +113,7 @@ ...@@ -110,7 +113,7 @@
prefix: envsetup_ prefix: envsetup_
lower: true lower: true
- name: load generated conf if exists - name: load generated conf
changed_when: false changed_when: false
check_mode: false check_mode: false
source_file: source_file:
...@@ -118,7 +121,7 @@ ...@@ -118,7 +121,7 @@
prefix: envsetup_ prefix: envsetup_
lower: true lower: true
- name: load local conf if exists - name: load local conf
changed_when: false changed_when: false
check_mode: false check_mode: false
source_file: source_file:
......
--- ---
- name: ubuntu apt repo sources list - name: ubuntu apt repo sources list
when: ansible_distribution == 'Ubuntu' when:
- not offline_mode | d(false)
- ansible_distribution == 'Ubuntu'
notify: update cache notify: update cache
copy: copy:
dest: /etc/apt/sources.list dest: /etc/apt/sources.list
...@@ -12,7 +14,9 @@ ...@@ -12,7 +14,9 @@
deb {{ repos_prefix }}security.ubuntu.com/ubuntu {{ repos_release }}-security main restricted universe multiverse deb {{ repos_prefix }}security.ubuntu.com/ubuntu {{ repos_release }}-security main restricted universe multiverse
- name: debian apt repo sources list - name: debian apt repo sources list
when: ansible_distribution == 'Debian' when:
- not offline_mode | d(false)
- ansible_distribution == 'Debian'
notify: update cache notify: update cache
copy: copy:
dest: /etc/apt/sources.list dest: /etc/apt/sources.list
...@@ -22,12 +26,16 @@ ...@@ -22,12 +26,16 @@
deb {{ repos_prefix }}{{ repos_deb_sec }}/debian-security {{ repos_release }}/updates main contrib non-free deb {{ repos_prefix }}{{ repos_deb_sec }}/debian-security {{ repos_release }}/updates main contrib non-free
- name: add skyreach apt repo key - name: add skyreach apt repo key
when: repos_skyreach_token | d(false) when:
- not offline_mode | d(false)
- repos_skyreach_token | d(false)
apt_key: apt_key:
url: https://{{ repos_skyreach_host }}/media/public.gpg url: https://{{ repos_skyreach_host }}/media/public.gpg
- name: add skyreach apt repo - name: add skyreach apt repo
when: repos_skyreach_token | d(false) when:
- not offline_mode | d(false)
- repos_skyreach_token | d(false)
apt_repository: apt_repository:
repo: deb https://{{ repos_skyreach_host }} packaging/apt/{{ repos_skyreach_token }}/ repo: deb https://{{ repos_skyreach_host }} packaging/apt/{{ repos_skyreach_token }}/
filename: skyreach filename: skyreach
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment