0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansibleでrhn_registerを使ってみた

Last updated at Posted at 2016-11-22

必要に駆られて、RedHat構築をPlaybook化した時にちょっと困った(主に自分のtypoで)し、日本語の記事が無かったので
わいがやるんや!の精神で投稿

雑な環境説明

Ansible2.0系が動くこと
ターゲットOSはRHEL6.7

雑な使い方

rhn_register.yml ってファイルを作って適当にincludeさせてます。
詳しくは、公式見てね。。。
http://docs.ansible.com/ansible/rhn_register_module.html

---

- name: Regist to RedHatNetwork
  rhn_register: state=present username=YOURNAME password=YOURPASSWD server_url=https://xmlrpc.rhn.redhat.com/XMLRPC

被った被害(自己責任)

1. server_urlに間違った内容を入れたあと、正しい内容にplaybookを直して再実行しても反映されない?感じがあった。
   → 例えば、server_url=https://hoge.rhn.redhat.com/ とかにして、実行後間違いに気づいて
server_url=https://fuga.rhn.redhat.com/ として再実行しても
     /etc/sysconfig/rhn/up2date の中身が変わらなかった感じがあった。
     トラブル初期時の記憶なのでちょっとうろ覚え

2. server_urlには https を入れましょう
https://access.redhat.com/solutions/53905
  RedhatNetworkにRegistは出来るけど、yum update が出来ないという↑の問題引きました

Ansibleの問題ではなくヒューマン的な問題でした。
多分server_urlとか指定しなくてもきちんと使えるとは思いますが、念のためhttpsできちんと指定し直し。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?