diff --git a/CHANGELOG.md b/CHANGELOG.md index b5a553a..78e6ed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml index c060c2b..86837d3 100644 --- a/ansible-role-requirements.yml +++ b/ansible-role-requirements.yml @@ -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 diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index f023e1c..8e1bf09 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -21,5 +21,14 @@ - include_role: name: python + - include_role: + name: git + + - include_role: + name: golang + + - include_role: + name: runc + - include_role: name: conmon diff --git a/tasks/debian.yml b/tasks/debian.yml index 858af07..b89d5a1 100644 --- a/tasks/debian.yml +++ b/tasks/debian.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index 0ff7e13..a773acf 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/tasks/redhat.yml b/tasks/redhat.yml index 858af07..3423c37 100644 --- a/tasks/redhat.yml +++ b/tasks/redhat.yml @@ -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 diff --git a/tasks/suse.yml b/tasks/suse.yml index 858af07..7a1a868 100644 --- a/tasks/suse.yml +++ b/tasks/suse.yml @@ -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 diff --git a/vars/centos-7.yml b/vars/centos-7.yml index 858af07..96d205f 100644 --- a/vars/centos-7.yml +++ b/vars/centos-7.yml @@ -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" } diff --git a/vars/centos-8.yml b/vars/centos-8.yml index 858af07..96d205f 100644 --- a/vars/centos-8.yml +++ b/vars/centos-8.yml @@ -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" } diff --git a/vars/main.yml b/vars/main.yml index 89d700b..e63cc23 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -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" diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 858af07..96d205f 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -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" } diff --git a/vars/redhat-8.yml b/vars/redhat-8.yml index 858af07..96d205f 100644 --- a/vars/redhat-8.yml +++ b/vars/redhat-8.yml @@ -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" } diff --git a/vars/suse-15.yml b/vars/suse-15.yml index 858af07..dd35984 100644 --- a/vars/suse-15.yml +++ b/vars/suse-15.yml @@ -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" } diff --git a/vars/ubuntu-18.04.yml b/vars/ubuntu-18.04.yml index 858af07..58302a3 100644 --- a/vars/ubuntu-18.04.yml +++ b/vars/ubuntu-18.04.yml @@ -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" } diff --git a/vars/ubuntu-19.10.yml b/vars/ubuntu-19.10.yml index 858af07..58302a3 100644 --- a/vars/ubuntu-19.10.yml +++ b/vars/ubuntu-19.10.yml @@ -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" } diff --git a/vars/ubuntu-20.04.yml b/vars/ubuntu-20.04.yml index 858af07..58302a3 100644 --- a/vars/ubuntu-20.04.yml +++ b/vars/ubuntu-20.04.yml @@ -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" }