Ver código fonte

Merge pull request #99 from jaredledvina/feature/use-https-for-apt-repo

Feature/use https for apt repo
Jared 8 anos atrás
pai
commit
316592ff16
3 arquivos alterados com 15 adições e 4 exclusões
  1. 1 1
      defaults/main.yml
  2. 8 1
      tasks/Debian/main.yml
  3. 6 2
      tasks/Ubuntu/main.yml

+ 1 - 1
defaults/main.yml

@@ -14,7 +14,7 @@ sensu_enterprise_dashboard_package: sensu-enterprise-dashboard
 # Sensu repo urls
 sensu_yum_repo_url: "https://sensu.global.ssl.fastly.net/yum/$releasever/$basearch/"
 sensu_yum_key_url: "https://sensu.global.ssl.fastly.net/yum/pubkey.gpg"
-sensu_apt_repo_url: "deb     http://repositories.sensuapp.org/apt {{ ansible_distribution_release }} main"
+sensu_apt_repo_url: "deb     https://repositories.sensuapp.org/apt {{ ansible_distribution_release }} main"
 sensu_apt_key_url: "https://sensu.global.ssl.fastly.net/apt/pubkey.gpg"
 sensu_freebsd_url: "https://sensu.global.ssl.fastly.net/freebsd/FreeBSD:{{ ansible_distribution_major_version }}:{{ ansible_architecture }}/"
 

+ 8 - 1
tasks/Debian/main.yml

@@ -4,6 +4,11 @@
 
   - include_vars: "{{ ansible_distribution }}.yml"
 
+  - name: Ensure apt-transport-https is installed
+    apt:
+      name: apt-transport-https
+      state: present
+
   - name: Ensure the Sensu APT repo GPG key is present
     apt_key:
       url: "{{ sensu_apt_key_url }}"
@@ -16,4 +21,6 @@
       update_cache: true
 
   - name: Ensure Sensu is installed
-    apt: name={{ sensu_package }} state={{ sensu_pkg_state }}
+    apt: 
+      name: {{ sensu_package }} 
+      state: {{ sensu_pkg_state }}

+ 6 - 2
tasks/Ubuntu/main.yml

@@ -5,7 +5,9 @@
   - include_vars: "{{ ansible_distribution }}.yml"
 
   - name: Ensure that https transport is ready
-    apt: name=apt-transport-https state=present
+    apt: 
+      name: apt-transport-https 
+      state: present
     
   - name: Ensure the Sensu APT repo GPG key is present
     apt_key:
@@ -19,4 +21,6 @@
       update_cache: true
 
   - name: Ensure Sensu is installed
-    apt: name={{ sensu_package }} state={{ sensu_pkg_state }}
+    apt: 
+      name: {{ sensu_package }}
+      state: {{ sensu_pkg_state }}