Move releng_config to a role so we can add masher user before fedmsg.

This commit is contained in:
Kevin Fenzi 2014-07-08 20:36:26 +00:00
parent 65760320e7
commit 75be449044
3 changed files with 2 additions and 2 deletions

View file

@ -1,146 +0,0 @@
- name: set root passwd
action: user name=root password={{ builder_rootpw }} state=present
- name: add mock user as 425
action: user name=mock uid=425 state=present home=/var/lib/mock createhome=yes system=yes
- name: make mock homedir 2775
action: file state=directory path=/var/lib/mock mode=2775 owner=mock group=mock
- name: add mock ssh dir
action: file state=directory path=/var/lib/mock/.ssh mode=700 owner=mock group=mock
- name: add mock ssh keys
action: copy src="{{ files }}/../roles/koji_builder/files//mock_auth_keys" dest=/var/lib/mock/.ssh/authorized_keys mode=644 owner=mock group=mock
- name: add ftpsync group
action: group name=ftpsync gid=263 system=yes state=present
- name: add ftpsync user
action: user name=ftpsync uid=263 group=ftpsync system=yes createhome=yes system=yes state=present
- name: add the ftpsync update-fullfilelist script
action: copy src="{{ files }}/releng/update-fullfilelist" dest=/usr/local/bin/update-fullfilelist owner=ftpsync group=ftpsync mode=555
- name: add masher group
action: group name=masher gid=751 system=yes state=present
# masher user 751
- name: add masher user as 751 - and group
action: user name=masher uid=751 group=masher home=/home/masher groups=mock,ftpsync
# masher ssh keys and config
- name: add masher ssh dir
action: file state=directory path=/home/masher/.ssh mode=700 owner=masher group=masher
- name: add masher ssh keys
action: copy src="{{ files }}/releng/mash/masher.{{ item }}" dest="/home/masher/.ssh/{{ item }}" mode=600 owner=masher group=masher
with_items:
- id_rsa.pub
- config
- name: add masher ssh priv key
action: copy src="{{ private }}/files/mash/masher.id_rsa" dest=/home/masher/.ssh/id_rsa mode=600 owner=masher group=masher
- name: add masher koji cert/key
action: copy src="{{ private }}/files/mash/masher.pem" dest=/home/masher/.fedora.cert mode=600 owner=masher group=masher
- name: add masher koji ca cert
action: copy src="{{ private }}/files/koji/buildercerts/fedora-ca.cert" dest=/home/masher/.fedora-server-ca.cert
# rawhide group
- name: rawhide group
action: group name=rawhide gid=265
# rawhide user 265
- name: add rawhide user
action: user name=rawhide uid=265 group=rawhide home=/tmp comment="rawhide compose account"
- name: make a bunch of dirs
action: file state=directory path={{ item }}
with_items:
- /pub
- /pub/fedora
- /pub/epel
- /pub/alt
- /epel
- /srv/pungi
- /mnt/fedora_koji
- /var/spool/rsyslog
- name: add pkgs
action: yum state=installed pkg={{ item }}
with_items:
- yum-utils
- koji
- strace
- mock
- nfs-utils
- git
- mash
- intltool
- mutt
- koji
- createrepo
- pykickstart
- pyliblzma
- name: /etc/koji/koji.conf
action: copy src="{{ files }}//../roles/koji_builder/files/koji.conf" dest=/etc/koji.conf
# mock configs
- name: put extra special mock configs in
action: copy src="{{ files }}/releng/{{ item }}" dest="/etc/mock/{{ item }}" mode=644
with_items:
- fedora-branched-compose-armhfp.cfg
- fedora-rawhide-compose-armhfp.cfg
- fedora-branched-compose-i386.cfg
- fedora-rawhide-compose-i386.cfg
- fedora-branched-compose-x86_64.cfg
- fedora-rawhide-compose-x86_64.cfg
# idmapd and make sure it's set to run
- name: idmapd.conf
action: copy src="{{ files }}/../roles/koji_builder/files//idmapd.conf" dest=/etc/idmapd.conf
tags:
- configs
- name: enable nfs-related services and run them (fedora)
action: service name={{ item }} enabled=true state=started
with_items:
- nfs-idmapd
- nfs-lock
when: ansible_distribution == 'Fedora'
- name: route to netapp network
action: copy src="{{ files }}/../roles/koji_builder/files/route-eth1" dest=/etc/sysconfig/network-scripts/route-eth1
notify:
- restart netapproute
- name: nfsmount - /pub/fedora
action: mount name=/pub/fedora src=vtap-fedora-nfs01.storage.phx2.redhat.com:/vol/fedora_ftp/fedora.redhat.com/pub/fedora fstype=nfs opts=rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3 passno=0 dump=0 state=mounted
- name: nfs mount points
action: mount name=/mnt/fedora_koji src=vtap-fedora-nfs01.storage.phx2.redhat.com:/vol/fedora_koji fstype=nfs opts=rw,hard,bg,intr,noatime,nodev,nosuid passno=0 dump=0 state=mounted
- name: make a mnt/koji link
action: file state=link src=/mnt/fedora_koji/koji dest=/mnt/koji
- name: symlink /srv/pungi/spin-kickstarts
action: file src=/mnt/fedora_koji/compose/spin-kickstarts dest=/srv/pungi/spin-kickstarts state=link
- name: symlink /srv/pungi/cache
action: file src=/mnt/fedora_koji/compose/cache dest=/srv/pungi/cache state=link
# put cron job in for branched compose
- name: branched compose cron
action: copy src="{{ files }}/releng/branched" dest=/etc/cron.d/branched
when: inventory_hostname.startswith('branched-composer')
# put cron job in for rawhide compose
- name: rawhide compose cron
action: copy src="{{ files }}/releng/rawhide" dest=/etc/cron.d/rawhide
when: inventory_hostname.startswith('rawhide-composer')
- name: sudoers defaults
action: copy src="{{ private }}/files/sudo/releng-sudoers" dest=/etc/sudoers mode=0440
tags:
- configs
- name: sudoers for ftpsync
action: copy src="{{ private }}/files/sudo/ftpsync-sudo" dest=/etc/sudoers.d/ftpsync mode=0440
tags:
- configs