Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/4.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Feb 13, 2020
2 parents 8d146d9 + 2c8cabd commit e43f4c7
Show file tree
Hide file tree
Showing 37 changed files with 380 additions and 192 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
---

os: linux

dist: bionic

language: minimal
language: shell

env:
matrix:
jobs:
- MOLECULE_SCENARIO_NAME="centos-7"
- MOLECULE_SCENARIO_NAME="suse-15"
- MOLECULE_SCENARIO_NAME="ubuntu-16.04"
- MOLECULE_SCENARIO_NAME="ubuntu-18.04"
- MOLECULE_SCENARIO_NAME="ubuntu-19.10"

matrix:
jobs:
allow_failures:
- env: MOLECULE_SCENARIO_NAME="centos-7"
- env: MOLECULE_SCENARIO_NAME="suse-15"
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Ansible Role for Snapd

## 4.2.0 - TBC
## 4.3.0 - TBC

### Major Changes

- Migrate molecule tests to Libvirt
## 4.2.0 - 2020-02-13

### Major Changes

- Migrate molecule driver to Libvirt
- Migrate molecule verifier to Ansible
- Support Ubuntu 19.10

## 4.1.0 - 2020-01-16

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ansible Role for Snapd Installation.

This role require Ansible 2.9 or higher.

This role was designed for Ubuntu 16.04/18.04 or RHEL/CentOS 7 or openSUSE Leap 15.1.
This role was designed for Ubuntu 16.04/18.04/19.10 or RHEL/CentOS 7 or openSUSE Leap 15.1.

## Role Variables

Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ galaxy_info:
versions:
- xenial
- bionic
- eoan
- name: EL
versions:
- 7
Expand Down
4 changes: 2 additions & 2 deletions molecule/centos-7/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ provisioner:
playbooks:
prepare: prepare.yml
verifier:
name: testinfra
name: ansible
lint:
name: flake8
name: ansible-lint
19 changes: 0 additions & 19 deletions molecule/centos-7/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,3 @@
become: true
roles:
- role: snapd

- hosts: all
remote_user: root
become: true
tasks:
- name: start service
service:
name: "{{ item.name }}"
state: "started"
loop:
- { name: "snapd" }
- { name: "snapd.socket" }
changed_when: false
ignore_errors: true

- name: snap version
command: snap version
register: result
changed_when: result is not succeeded
8 changes: 8 additions & 0 deletions molecule/centos-7/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@
- name: cp -rfT /etc/skel /root
raw: |
cp -rfT /etc/skel /root
changed_when: false
ignore_errors: true

- name: setenforce 0
raw: |
setenforce 0
changed_when: false
ignore_errors: true

- name: systemctl stop firewalld.service
raw: |
systemctl stop firewalld.service
changed_when: false
ignore_errors: true

- name: systemctl stop ufw.service
raw: |
systemctl stop ufw.service
changed_when: false
ignore_errors: true

- name: redhat-7 | subscription-manager register
Expand All @@ -31,22 +35,26 @@
--username={{ lookup('env', 'REDHAT_USERNAME') }} \
--password={{ lookup('env', 'REDHAT_PASSWORD') }} \
--autosubscribe
changed_when: false
ignore_errors: true

- name: debian | apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
raw: |
apt-get update
apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
changed_when: false
ignore_errors: true

- name: redhat | yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
raw: |
yum makecache fast
yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
changed_when: false
ignore_errors: true

- name: suse | zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
raw: |
zypper -n --gpg-auto-import-keys refresh
zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
changed_when: false
ignore_errors: true
15 changes: 0 additions & 15 deletions molecule/centos-7/tests/test_default.py

This file was deleted.

24 changes: 24 additions & 0 deletions molecule/centos-7/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

# (c) Wong Hoi Sing Edison <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- hosts: all
remote_user: root
become: true
tasks:
- name: snap version
command: snap version
register: result
changed_when: result is not succeeded
4 changes: 2 additions & 2 deletions molecule/redhat-7/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ provisioner:
playbooks:
prepare: prepare.yml
verifier:
name: testinfra
name: ansible
lint:
name: flake8
name: ansible-lint
19 changes: 0 additions & 19 deletions molecule/redhat-7/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,3 @@
become: true
roles:
- role: snapd

- hosts: all
remote_user: root
become: true
tasks:
- name: start service
service:
name: "{{ item.name }}"
state: "started"
loop:
- { name: "snapd" }
- { name: "snapd.socket" }
changed_when: false
ignore_errors: true

- name: snap version
command: snap version
register: result
changed_when: result is not succeeded
8 changes: 8 additions & 0 deletions molecule/redhat-7/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@
- name: cp -rfT /etc/skel /root
raw: |
cp -rfT /etc/skel /root
changed_when: false
ignore_errors: true

- name: setenforce 0
raw: |
setenforce 0
changed_when: false
ignore_errors: true

- name: systemctl stop firewalld.service
raw: |
systemctl stop firewalld.service
changed_when: false
ignore_errors: true

- name: systemctl stop ufw.service
raw: |
systemctl stop ufw.service
changed_when: false
ignore_errors: true

- name: redhat-7 | subscription-manager register
Expand All @@ -31,22 +35,26 @@
--username={{ lookup('env', 'REDHAT_USERNAME') }} \
--password={{ lookup('env', 'REDHAT_PASSWORD') }} \
--autosubscribe
changed_when: false
ignore_errors: true

- name: debian | apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
raw: |
apt-get update
apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
changed_when: false
ignore_errors: true

- name: redhat | yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
raw: |
yum makecache fast
yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
changed_when: false
ignore_errors: true

- name: suse | zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
raw: |
zypper -n --gpg-auto-import-keys refresh
zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
changed_when: false
ignore_errors: true
15 changes: 0 additions & 15 deletions molecule/redhat-7/tests/test_default.py

This file was deleted.

24 changes: 24 additions & 0 deletions molecule/redhat-7/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

# (c) Wong Hoi Sing Edison <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- hosts: all
remote_user: root
become: true
tasks:
- name: snap version
command: snap version
register: result
changed_when: result is not succeeded
4 changes: 2 additions & 2 deletions molecule/suse-15/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ provisioner:
playbooks:
prepare: prepare.yml
verifier:
name: testinfra
name: ansible
lint:
name: flake8
name: ansible-lint
19 changes: 0 additions & 19 deletions molecule/suse-15/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,3 @@
become: true
roles:
- role: snapd

- hosts: all
remote_user: root
become: true
tasks:
- name: start service
service:
name: "{{ item.name }}"
state: "started"
loop:
- { name: "snapd" }
- { name: "snapd.socket" }
changed_when: false
ignore_errors: true

- name: snap version
command: snap version
register: result
changed_when: result is not succeeded
8 changes: 8 additions & 0 deletions molecule/suse-15/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@
- name: cp -rfT /etc/skel /root
raw: |
cp -rfT /etc/skel /root
changed_when: false
ignore_errors: true

- name: setenforce 0
raw: |
setenforce 0
changed_when: false
ignore_errors: true

- name: systemctl stop firewalld.service
raw: |
systemctl stop firewalld.service
changed_when: false
ignore_errors: true

- name: systemctl stop ufw.service
raw: |
systemctl stop ufw.service
changed_when: false
ignore_errors: true

- name: redhat-7 | subscription-manager register
Expand All @@ -31,22 +35,26 @@
--username={{ lookup('env', 'REDHAT_USERNAME') }} \
--password={{ lookup('env', 'REDHAT_PASSWORD') }} \
--autosubscribe
changed_when: false
ignore_errors: true

- name: debian | apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
raw: |
apt-get update
apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
changed_when: false
ignore_errors: true

- name: redhat | yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
raw: |
yum makecache fast
yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
changed_when: false
ignore_errors: true

- name: suse | zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
raw: |
zypper -n --gpg-auto-import-keys refresh
zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
changed_when: false
ignore_errors: true
Loading

0 comments on commit e43f4c7

Please sign in to comment.