iuscommunity / automation-examples Goto Github PK
View Code? Open in Web Editor NEWautomation examples for The IUS Community Project
License: The Unlicense
automation examples for The IUS Community Project
License: The Unlicense
CENTOS 7
the script is looking for /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
should it be /etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
Just sharing back ;)
https://github.com/ec-europa/ne-pipelines/blob/master/drone/fpfis-rpm-repo.yml
https://github.com/ec-europa/docker-fpfis/blob/release/mock-beta/Dockerfile
That's what we use to build and publish RPMs from drone
The EOL of EL5 is coming up and we need to remove any EL5 examples.
Trying to run the Ansible playbook: ansible-playbook -i "hosts" enable-ius.yml
I get the error: Failure downloading https://centos7.iuscommunity.org/ius-release.rpm, 'NoneType' object has no attribute 'read'
Running with -vvvv
TASK [install IUS release package] *********************************************
task path: /home/vagrant/ansible-playbook-aegir-centos/enable-ius.yml:24
<haproxy.dev> ESTABLISH SSH CONNECTION FOR USER: None
<haproxy.dev> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r haproxy.dev '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514 `" && echo ansible-tmp-1478002414.39-180297584212514="` echo $HOME/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514 `" ) && sleep 0'"'"''
<haproxy.dev> PUT /tmp/tmpcDwJ_w TO /home/vagrant/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514/yum
<haproxy.dev> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[haproxy.dev]'
<haproxy.dev> ESTABLISH SSH CONNECTION FOR USER: None
<haproxy.dev> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r haproxy.dev '/bin/sh -c '"'"'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514/ /home/vagrant/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514/yum && sleep 0'"'"''
<haproxy.dev> ESTABLISH SSH CONNECTION FOR USER: None
<haproxy.dev> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt haproxy.dev '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-qhedrztmtfnuecabiruxawxazzdnjrzl; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514/yum; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1478002414.39-180297584212514/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
fatal: [haproxy.dev]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"conf_file": null, "disable_gpg_check": false, "disablerepo": null, "enablerepo": null, "exclude": null, "install_repoquery": true, "list": null, "name": ["https://centos7.iuscommunity.org/ius-release.rpm"], "state": "present", "update_cache": false, "validate_certs": true}, "module_name": "yum"}, "msg": "Failure downloading https://centos7.iuscommunity.org/ius-release.rpm, 'NoneType' object has no attribute 'read'"}
Something else I notice and maybe help; When you run a task to install the epel repo using the state: latest
it fails instead when you run as state: present
This one will fail:
- name: Install epel repo
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
state: latest
But this one will work:
- name: Install epel repo
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
state: present
Unfortunately doing the same on for the IUS repo it always fails:
- name: Install IUS repo
yum:
name: https://centos7.iuscommunity.org/ius-release.rpm
state: present
There is a minor problem with the enable-ius.sh script in the bash branch. If the ius-release or epel-release RPM URLs fail to resolve for whatever reason, the script keeps running and tries to import a key file that doesn't exist, resulting in a misleading error.
# rpm --import /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
error: /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY: import read failed(2).
Using set -e
(abort for any non-zero exit code) at the start of the script should be able to handle this, as long as yum properly produces a non-zero exit code when yum install <URL_TO_RPM>
fails to resolve the given URL.
Please add a license or a clarifying statement under which conditions the scripts can be used, thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.