Sfoglia il codice sorgente

Base windows config

Jared Ledvina 7 anni fa
parent
commit
3a199de733
2 ha cambiato i file con 65 aggiunte e 0 eliminazioni
  1. 14 0
      molecule/windows/Dockerfile.j2
  2. 51 0
      molecule/windows/molecule.yml

+ 14 - 0
molecule/windows/Dockerfile.j2

@@ -0,0 +1,14 @@
+# Molecule managed
+
+{% if item.registry is defined %}
+FROM {{ item.registry.url }}/{{ item.image }}
+{% else %}
+FROM {{ item.image }}
+{% endif %}
+
+RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
+    elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \
+    elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
+    elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a; \
+    elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
+    elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi

+ 51 - 0
molecule/windows/molecule.yml

@@ -0,0 +1,51 @@
+---
+dependency:
+  name: galaxy
+driver:
+  name: docker
+lint:
+  name: yamllint
+platforms:
+  - name: windows-ltsc2016
+    image: microsoft/windowsservercore:ltsc2016
+provisioner:
+  name: ansible
+  config_options:
+    defaults:
+      callback_whitelist: timer,profile_tasks
+      fact_caching: jsonfile
+      fact_caching_connection: ./cache
+      poll_interval: 3
+      forks: 100
+    connection:
+      pipelining: true
+  playbooks:
+    prepare: ../shared/prepare.yml
+    create: ../shared/create.yml
+    destroy: ../shared/destroy.yml
+    converge: ../shared/playbook.yml
+    verify: ../shared/verify.yml
+  lint:
+    name: ansible-lint
+  inventory:
+    group_vars:
+      all:
+        sensu_master: true
+        sensu_include_dashboard: true
+        rabbitmq_server: true
+        redis_server: true
+        rabbitmq_host: "{{ ansible_hostname }}"
+        redis_host: "{{ ansible_hostname }}"
+        sensu_api_host: "{{ ansible_hostname }}"
+        ansible_default_ipv4:
+          address: 127.0.0.1
+    host_vars:
+      windows-ltsc2016:
+        inspec_download_url: https://packages.chef.io/files/stable/inspec/2.2.16/windows/2016/inspec-2.2.16-1-x64.msi
+        inspec_download_sha256sum: 468452795abfd018f0eab31f9e5380b5bfadddf894bba751f40f8c20dc38a471
+scenario:
+  name: windows
+verifier:
+  name: inspec
+  lint:
+    name: rubocop