Skip to content

Commit

Permalink
partly rollback as source code build style
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Apr 17, 2020
1 parent 5dc4141 commit 17ee5ca
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 25 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- Support Ubuntu 20.04
- Remove Ubuntu 16.04 support
- Upgrade minimal Molecule support to 3.0.2
- Install from pre-build archive

## 4.2.0 - 2020-02-22

Expand Down
12 changes: 12 additions & 0 deletions ansible-role-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@
- name: python
src: https://github.com/alvistack/ansible-role-python
version: develop

- name: git
src: https://github.com/alvistack/ansible-role-git
version: develop

- name: golang
src: https://github.com/alvistack/ansible-role-golang
version: develop

- name: runc
src: https://github.com/alvistack/ansible-role-runc
version: develop
9 changes: 9 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,14 @@
- include_role:
name: python

- include_role:
name: git

- include_role:
name: golang

- include_role:
name: runc

- include_role:
name: conmon
9 changes: 9 additions & 0 deletions tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
# 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.

- name: apt-get install
apt:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ _apt }}"
register: result
until: result is succeeded
tags: conmon
13 changes: 7 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,20 @@
until: get_url_result is succeeded
tags: conmon

- name: unarchive package
- name: build package
shell: |
set -o pipefail
cd /usr/local/bin
TMP_DIR="$(mktemp -d)" \
&& cp {{ conmon_download.dest }} $TMP_DIR/conmon \
&& chown root:root $TMP_DIR/conmon \
&& chmod 0755 $TMP_DIR/conmon \
&& mv $TMP_DIR/conmon . \
&& tar -zx -C $TMP_DIR -f {{ conmon_download.dest }} --strip-components=1 \
&& cd $TMP_DIR \
&& make \
&& make install \
&& rm -rf $TMP_DIR
args:
executable: "/bin/bash"
when: get_url_result is changed
register: result
until: result is succeeded
tags: conmon

- name: prepare files
Expand Down
9 changes: 9 additions & 0 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
# 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.

- name: yum install
yum:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ _yum }}"
register: result
until: result is succeeded
tags: conmon
11 changes: 11 additions & 0 deletions tasks/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@
# 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.

- name: zypper install
vars:
ansible_python_interpreter: "python3"
zypper:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ _zypper }}"
register: result
until: result is succeeded
tags: conmon
7 changes: 7 additions & 0 deletions vars/centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_yum:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "glib2-devel" }
- { state: "latest", name: "glibc-devel" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkgconfig" }
7 changes: 7 additions & 0 deletions vars/centos-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_yum:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "glib2-devel" }
- { state: "latest", name: "glibc-devel" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkgconfig" }
36 changes: 18 additions & 18 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@

_conmon_download:
v2.0.15:
url: "https://github.com/containers/conmon/releases/download/v2.0.15/conmon"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.15"
checksum: "sha1:2507385705de4904a1d2d37f627c00e94bba72ff"
url: "https://github.com/containers/conmon/archive/v2.0.15.tar.gz"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.15.tar.gz"
checksum: "sha1:b1f93bd7bace53ac157cedaa6750f9d5c44e1bd6"
v2.0.14:
url: "https://github.com/containers/conmon/releases/download/v2.0.14/conmon"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.14"
checksum: "sha1:b75f775330113675ff6edd8351e4cd67dec9ffd2"
url: "https://github.com/containers/conmon/archive/v2.0.14.tar.gz"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.14.tar.gz"
checksum: "sha1:b7ad2c2e0b2782842db73c2f8094f1743dac62a6"
v2.0.13:
url: "https://github.com/containers/conmon/releases/download/v2.0.13/conmon"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.13"
checksum: "sha1:5ef59bbc973ee8173a9f7700daf5c6a8743bae61"
url: "https://github.com/containers/conmon/archive/v2.0.13.tar.gz"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.13.tar.gz"
checksum: "sha1:d790fc4baeb5150edce57b54a12f4cd4a08f96d5"
v2.0.12:
url: "https://github.com/containers/conmon/releases/download/v2.0.12/conmon"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.12"
checksum: "sha1:a267aaef8a06d5d5bb3acfd64272d783c1ec253f"
url: "https://github.com/containers/conmon/archive/v2.0.12.tar.gz"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.12.tar.gz"
checksum: "sha1:b61a21f568b6f0166d2cdd620cc2bd71bb32b054"
v2.0.11:
url: "https://github.com/containers/conmon/releases/download/v2.0.11/conmon"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.11"
checksum: "sha1:66529371bd9f9fa21291b70cca506f69c44d68fb"
url: "https://github.com/containers/conmon/archive/v2.0.11.tar.gz"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.11.tar.gz"
checksum: "sha1:4cd3c95ef03a9c53b8113703e28ec48e46bafc40"
v2.0.10:
url: "https://github.com/containers/conmon/releases/download/v2.0.10/conmon"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.10"
checksum: "sha1:2fa7e18daa424b5b6808192b805ba53529a0fd32"
url: "https://github.com/containers/conmon/archive/v2.0.10.tar.gz"
dest: "{{ ansible_user_dir }}/.ansible/tmp/conmon-v2.0.10.tar.gz"
checksum: "sha1:289611c9bc92f722b54023757205bec100021589"
7 changes: 7 additions & 0 deletions vars/redhat-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_yum:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "glib2-devel" }
- { state: "latest", name: "glibc-devel" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkgconfig" }
7 changes: 7 additions & 0 deletions vars/redhat-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_yum:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "glib2-devel" }
- { state: "latest", name: "glibc-devel" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkgconfig" }
7 changes: 7 additions & 0 deletions vars/suse-15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_zypper:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "glib2-devel" }
- { state: "latest", name: "glibc-devel" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkgconfig" }
7 changes: 7 additions & 0 deletions vars/ubuntu-18.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_apt:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "libc6-dev" }
- { state: "latest", name: "libglib2.0-dev" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkg-config" }
7 changes: 7 additions & 0 deletions vars/ubuntu-19.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_apt:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "libc6-dev" }
- { state: "latest", name: "libglib2.0-dev" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkg-config" }
7 changes: 7 additions & 0 deletions vars/ubuntu-20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# 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.

_apt:
- { state: "latest", name: "gcc" }
- { state: "latest", name: "libc6-dev" }
- { state: "latest", name: "libglib2.0-dev" }
- { state: "latest", name: "make" }
- { state: "latest", name: "pkg-config" }

0 comments on commit 17ee5ca

Please sign in to comment.