Fix old variable usage. Patch from janeznemanic. Thanks!

This commit is contained in:
Kevin Fenzi 2014-01-01 19:15:11 +00:00
parent d011bbde2c
commit f7d56ff2b1
98 changed files with 886 additions and 889 deletions

View file

@ -5,30 +5,30 @@
- packages
- name: /etc/pki/tls/private/totpcgi.pem
copy: src=$puppet_private/2fa-certs/keys/${inventory_hostname}.pem dest=/etc/pki/tls/private/totpcgi.pem mode=0400
copy: src="{{ puppet_private }}/2fa-certs/keys/{{ inventory_hostname }}.pem" dest=/etc/pki/tls/private/totpcgi.pem mode=0400
tags:
- config
- name: /etc/pki/tls/private/totpcgi-ca.cert
copy: src=$puppet_private/2fa-certs/keys/ca.crt dest=/etc/pki/tls/private/totpcgi-ca.cert mode=0400
copy: src="{{ puppet_private }}/2fa-certs/keys/ca.crt" dest=/etc/pki/tls/private/totpcgi-ca.cert mode=0400
tags:
- config
- name: /etc/pam_url.conf - split for staging/phx2/everyone else
template: src=$item dest=/etc/pam_url.conf mode=0644
template: src={{ item }} dest=/etc/pam_url.conf mode=0644
with_first_found:
- $files/2fa/pam_url.conf.${inventory_hostname}
- $files/2fa/pam_url.conf.${ansible_domain}
- $files/2fa/pam_url.conf.j2
- "{{ files }}/2fa/pam_url.conf.{{ inventory_hostname }}"
- "{{ files }}/2fa/pam_url.conf.{{ ansible_domain }}"
- "{{ files }}/2fa/pam_url.conf.j2"
tags:
- config
- name: /etc/pam.d/sudo
copy: src=$item dest=/etc/pam.d/sudo mode=0644
copy: src={{ item }} dest=/etc/pam.d/sudo mode=0644
with_first_found:
- $files/2fa/sudo.pam.${inventory_hostname}
- $files/2fa/sudo.pam.${ansible_domain}
- $files/2fa/sudo.pam
- "{{ files }}/2fa/sudo.pam.{{ inventory_hostname }}"
- "{{ files }}/2fa/sudo.pam.{{ ansible_domain }}"
- "{{ files }}/2fa/sudo.pam"
tags:
- config

View file

@ -1,6 +1,6 @@
---
- name: install needed packages for accelerated mode
yum: pkg=$item state=installed
yum: pkg={{ item }} state=installed
with_items:
- python-keyczar
tags:

View file

@ -1,7 +1,7 @@
---
# install apache(httpd)
- name: install apache
yum: name=$item state=installed
yum: name={{ item }} state=installed
with_items:
- httpd
- httpd-tools
@ -20,7 +20,7 @@
# install hash randomization hotfix
- name: hotfix - copy over new httpd init script
copy: src=$files/hotfix/httpd/httpd.init dest=/etc/init.d/httpd
copy: src="{{ files }}/hotfix/httpd/httpd.init" dest=/etc/init.d/httpd
owner=root group=root mode=0755
notify:
- restart apache
@ -30,7 +30,7 @@
- apache
- name: hotfix - copy over new httpd sysconfig
copy: src=$files/hotfix/httpd/httpd.sysconfig dest=/etc/sysconfig/httpd
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd
notify:
- restart apache
tags:
@ -39,7 +39,7 @@
- apache
- name: add appserver headers.conf
template: src=$files/httpd/headers.conf.j2 dest=/etc/httpd/conf.d/headers.conf
template: src="{{ files }}/httpd/headers.conf.j2" dest=/etc/httpd/conf.d/headers.conf
notify:
- restart apache
tags:
@ -47,10 +47,10 @@
- apache
- name: add apache_status location for collectd
template: src=$files/httpd/apachestatus.conf dest=/etc/httpd/conf.d/apachestatus.conf
template: src="{{ files }}/httpd/apachestatus.conf" dest=/etc/httpd/conf.d/apachestatus.conf
notify:
- restart apache
tags:
- config
- apache

View file

@ -6,7 +6,7 @@
- packages
- name: ntp pkgs
action: yum state=installed pkg=$item
action: yum state=installed pkg={{ item }}
with_items:
- ntpdate
- ntp
@ -22,13 +22,13 @@
- packages
- name: put step-tickers in place
action: copy src=$files/common/step-tickers dest=/etc/ntp/step-tickers
action: copy src="{{ files }}/common/step-tickers" dest=/etc/ntp/step-tickers
- name: enable the service
action: service name=ntpd state=running enabled=true
- name: edit hostname to be instance name - prefix hostbase var if it exists
action: shell hostname ${hostbase}`curl -s http://169.254.169.254/latest/meta-data/instance-id`
action: shell hostname {{ hostbase }}`curl -s http://169.254.169.254/latest/meta-data/instance-id`
tags:
- config
@ -42,7 +42,7 @@
- name: add root keys for sysadmin-main and other allowed users
action: authorized_key user=root key="{{ item }}"
with_pipe:
- "${auth_keys_from_fas} @sysadmin-main ${root_auth_users}"
- "{{ auth_keys_from_fas }} @sysadmin-main {{ root_auth_users }}"
tags:
- config
ignore_errors: true

View file

@ -11,13 +11,13 @@
# install collected.conf
- name: /etc/collectd.conf
template: src=$files/collectd/collectd.conf.j2 dest=/etc/collectd.conf
template: src="{{ files }}/collectd/collectd.conf.j2" dest=/etc/collectd.conf
notify:
- restart collectd
# install collectd-network config
- name: /etc/collectd.d/network.conf
copy: src=$files/collectd/network-client.conf dest=/etc/collectd.d/network.conf
copy: src="{{ files }}/collectd/network-client.conf" dest=/etc/collectd.d/network.conf
notify:
- restart collectd
@ -26,13 +26,13 @@
yum: state=installed name=collectd-apache
notify:
- restart collectd
when_set: $collectd_apache
when_set: {{ collectd_apache }}
- name: /etc/collectd/apache.conf
copy: src=$files/collectd/apache.conf dest=/etc/collectd.d/apache.conf
copy: src="{{ files }}/collectd/apache.conf" dest=/etc/collectd.d/apache.conf
notify:
- restart collectd
when_set: $collectd_apache
when_set: {{ collectd_apache }}
# each of the below should move to a separate task list
@ -60,4 +60,4 @@
# webproxy

View file

@ -5,7 +5,7 @@
#
- name: Install common scripts
action: copy src=$item dest=/usr/local/bin/ owner=root group=root mode=0755
with_fileglob: $files/common-scripts/*
action: copy src={{ item }} dest=/usr/local/bin/ owner=root group=root mode=0755
with_fileglob: "{{ files }}/common-scripts/*"
tags:
- config

View file

@ -17,13 +17,13 @@
- name: reboot the box
action: command /sbin/reboot
when: ${growpart.rc} == 0
when: "{{ growpart.rc }} == 0"
ignore_errors: true
- name: wait for it to come back (should be quick)
local_action: wait_for host=${inventory_hostname} port=22 delay=10 timeout=120
when: ${growpart.rc} == 0
local_action: wait_for host={{ inventory_hostname }} port=22 delay=10 timeout=120
when: "{{ growpart.rc }} == 0"
- name: resize the /dev/vda 2 fs
action: command resize2fs /dev/vda2
when: ${growpart.rc} == 0
when: "{{ growpart.rc }} == 0"

View file

@ -10,9 +10,9 @@
# Note that if it's not set it will just skip this play and do nothing.
#
- name: setup /etc/hosts for some clients
action: copy src=$item dest=/etc/hosts
action: copy src={{ item }} dest=/etc/hosts
with_first_found:
- files: $files/hosts/${ansible_fqdn}-hosts $files/hosts/${ansible_hostname}-hosts $files/hosts/${ansible_domain}-hosts $files/hosts/${host_group}-hosts
- files: "{{ files }}/hosts/{{ ansible_fqdn }}-hosts" "{{ files }}/hosts/{{ ansible_hostname }}-hosts" "{{ files }}/hosts/{{ ansible_domain }}-hosts" "{{ files }}/hosts/{{ host_group }}-hosts"
skip: true
tags:
- config

View file

@ -22,13 +22,13 @@
- service
- name: iptables
action: template src=$item dest=/etc/sysconfig/iptables mode=600 backup=yes
action: template src={{ item }} dest=/etc/sysconfig/iptables mode=600 backup=yes
with_first_found:
- $iptables
- $files/iptables/iptables.${ansible_fqdn}
- $files/iptables/iptables.${host_group}
- $files/iptables/iptables.${env}
- $files/iptables/iptables
- "{{ iptables }}"
- "{{ files }}/iptables/iptables.{{ ansible_fqdn }}"
- "{{ files }}/iptables/iptables.{{ host_group }}"
- "{{ files }}/iptables/iptables.{{ env }}"
- "{{ files }}/iptables/iptables"
notify:
- restart iptables
tags:

View file

@ -16,12 +16,12 @@
owner=sks group=sks mode=0755
- name: /srv/sks/membership
copy: src=$files/keyserver/membership dest=/srv/sks/membership owner=sks group=sks mode=0644
copy: src="{{ files }}/keyserver/membership" dest=/srv/sks/membership owner=sks group=sks mode=0644
tags:
- config
- name: /srv/sks/sksconf
copy: src=$files/keyserver/sksconf dest=/srv/sks/sksconf owner=sks group=sks mode=0644
copy: src="{{ files }}/keyserver/sksconf" dest=/srv/sks/sksconf owner=sks group=sks mode=0644
tags:
- config
@ -32,47 +32,47 @@
owner=sks group=sks mode=0755
- name: /srv/sks/web/index.html
copy: src=$files/keyserver/index.html dest=/srv/sks/web/index.html owner=sks group=sks mode=0644
copy: src="{{ files }}/keyserver/index.html" dest=/srv/sks/web/index.html owner=sks group=sks mode=0644
tags:
- config
- name: /srv/sks/web/css.css
copy: src=$files/keyserver/css.css dest=/srv/sks/web/css.css owner=sks group=sks mode=0644
copy: src="{{ files }}/keyserver/css.css" dest=/srv/sks/web/css.css owner=sks group=sks mode=0644
tags:
- config
- name: /etc/httpd/conf.d/sks.conf
copy: src=$files/keyserver/sks.conf dest=/etc/httpd/conf.d/sks.conf owner=root group=root mode=0644
copy: src="{{ files }}/keyserver/sks.conf" dest=/etc/httpd/conf.d/sks.conf owner=root group=root mode=0644
tags:
- config
- name: /etc/httpd/conf.d/ssl.conf
copy: src=$files/keyserver/ssl.conf dest=/etc/httpd/conf.d/ssl.conf owner=root group=root mode=0644
copy: src="{{ files }}/keyserver/ssl.conf" dest=/etc/httpd/conf.d/ssl.conf owner=root group=root mode=0644
tags:
- config
- name: /etc/pki/tls/wildcard-2013.fedoraproject.org.cert
copy: src=$puppet_private/httpd/wildcard-2013.fedoraproject.org.cert dest=/etc/pki/tls/wildcard-2013.fedoraproject.org.cert owner=root group=root mode=0600
copy: src="{{ puppet_private }}/httpd/wildcard-2013.fedoraproject.org.cert" dest=/etc/pki/tls/wildcard-2013.fedoraproject.org.cert owner=root group=root mode=0600
tags:
- config
- name: /etc/pki/tls/wildcard-2013.fedoraproject.org.key
copy: src=$puppet_private/httpd/wildcard-2013.fedoraproject.org.key dest=/etc/pki/tls/wildcard-2013.fedoraproject.org.key owner=root group=root mode=0600
copy: src="{{ puppet_private }}/httpd/wildcard-2013.fedoraproject.org.key" dest=/etc/pki/tls/wildcard-2013.fedoraproject.org.key owner=root group=root mode=0600
tags:
- config
- name: /etc/pki/tls/wildcard-2013.fedoraproject.org.intermediate.cert
copy: src=$puppet_private/httpd/wildcard-2013.fedoraproject.org.intermediate.cert dest=/etc/pki/tls/wildcard-2013.fedoraproject.org.intermediate.cert owner=root group=root mode=0600
copy: src="{{ puppet_private }}/httpd/wildcard-2013.fedoraproject.org.intermediate.cert" dest=/etc/pki/tls/wildcard-2013.fedoraproject.org.intermediate.cert owner=root group=root mode=0600
tags:
- config
- name: /etc/pki/tls/keys_fedoraproject_org.crt.pem
copy: src=$puppet_private/keys_fedoraproject_org.crt.pem dest=/etc/pki/tls/keys_fedoraproject_org.crt.pem owner=root group=root mode=0600
copy: src="{{ puppet_private }}/keys_fedoraproject_org.crt.pem" dest=/etc/pki/tls/keys_fedoraproject_org.crt.pem owner=root group=root mode=0600
tags:
- config
- name: /etc/pki/tls/keys_fedoraproject_org.key
copy: src=$puppet_private/keys_fedoraproject_org.key dest=/etc/pki/tls/keys_fedoraproject_org.key owner=root group=root mode=0600
copy: src="{{ puppet_private }}/keys_fedoraproject_org.key" dest=/etc/pki/tls/keys_fedoraproject_org.key owner=root group=root mode=0600
tags:
- config

View file

@ -1,5 +1,5 @@
- name: set root passwd
action: user name=root password=$builder_rootpw state=present
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
@ -11,7 +11,7 @@
action: file state=directory path=/var/lib/mock/.ssh mode=700 owner=mock group=mock
- name: add mock ssh keys
action: copy src=$files/kojibuilder/mock_auth_keys dest=/var/lib/mock/.ssh/authorized_keys mode=640 owner=mock group=mock
action: copy src="{{ files }}/kojibuilder/mock_auth_keys" dest=/var/lib/mock/.ssh/authorized_keys mode=640 owner=mock group=mock
- name: add kojibuilder
action: user name=kojibuilder groups=mock
@ -23,10 +23,10 @@
action: file state=directory path=/home/mockbuilder/.ssh mode=700 owner=mockbuilder group=mockbuilder
- name: mockbuilder ssh key
action: copy src=$files/kojibuilder/ftbfs_auth_keys dest=/home/mockbuilder/.ssh/authorized_keys mode=644 owner=mockbuilder group=mockbuilder
action: copy src="{{ files }}/kojibuilder/ftbfs_auth_keys" dest=/home/mockbuilder/.ssh/authorized_keys mode=644 owner=mockbuilder group=mockbuilder
- name: make a bunch of dirs
action: file state=directory path=$item
action: file state=directory path={{ item }}
with_items:
- /pub
- /mnt/fedora_koji
@ -35,16 +35,16 @@
- /var/spool/rsyslog
- name: add builder infra yum repo
action: copy src=$files/kojibuilder/builder-infrastructure.repo dest=/etc/yum.repos.d/builder-infrastructure.repo
action: copy src="{{ files }}/kojibuilder/builder-infrastructure.repo" dest=/etc/yum.repos.d/builder-infrastructure.repo
- name: clean up packages we do not need
action: yum state=removed pkg=$item
action: yum state=removed pkg={{ item }}
with_items:
- audit
- 'cronie\*'
- name: add pkgs
action: yum state=installed pkg=$item
action: yum state=installed pkg={{ item }}
with_items:
- yum-utils
- koji-builder
@ -56,49 +56,49 @@
- ntpdate
- name: /etc/kojid/kojid.conf
action: copy src=$files/kojibuilder/kojid.conf dest=/etc/kojid/kojid.conf
action: copy src="{{ files }}/kojibuilder/kojid.conf" dest=/etc/kojid/kojid.conf
when: not inventory_hostname.startswith(('arm01','arm03'))
notify:
- restart kojid
- name: arm /etc/kojid/kojid.conf
action: copy src=$files/kojibuilder/arm-kojid.conf dest=/etc/kojid/kojid.conf
action: copy src="{{ files }}/kojibuilder/arm-kojid.conf" dest=/etc/kojid/kojid.conf
when: inventory_hostname.startswith(('arm01','arm03'))
notify:
- restart kojid
- name: /etc/koji/koji.conf
action: copy src=$files/kojibuilder/koji.conf dest=/etc/koji.conf
action: copy src="{{ files }}/kojibuilder/koji.conf" dest=/etc/koji.conf
when: not inventory_hostname.startswith(('arm01','arm03'))
- name: /etc/koji/koji.conf
action: copy src=$files/kojibuilder/arm-koji.conf dest=/etc/koji.conf
action: copy src="{{ files }}/kojibuilder/arm-koji.conf" dest=/etc/koji.conf
when: inventory_hostname.startswith(('arm01','arm03'))
- name: copy over koji ca cert
action: copy src=$private/files/koji/buildercerts/fedora-ca.cert dest=/etc/kojid/cacert.pem
action: copy src="{{ private }}/files/koji/buildercerts/fedora-ca.cert" dest=/etc/kojid/cacert.pem
- name: copy over /etc/security/limits.conf
action: copy src=$files/kojibuilder/limits.conf dest=/etc/security/limits.conf
action: copy src="{{ files }}/kojibuilder/limits.conf" dest=/etc/security/limits.conf
- name: copy over builder cert to /etc/kojid/kojibuilder.pem
action: copy src=$private/files/koji/buildercerts/${inventory_hostname}.pem dest=/etc/kojid/kojibuilder.pem mode=600
action: copy src="{{ private }}/files/koji/buildercerts/{{ inventory_hostname }}.pem" dest=/etc/kojid/kojibuilder.pem mode=600
- name: chkconfig kojid on and leave it running
action: service name=kojid enabled=on
# action: service name=kojid enabled=on state=started
- name: copy over authorized keys for root
action: copy src=$files/kojibuilder/root_auth_keys dest=/root/.ssh/authorized_keys mode=644
action: copy src="{{ files }}/kojibuilder/root_auth_keys" dest=/root/.ssh/authorized_keys mode=644
# idmapd and make sure it's set to run
- name: idmapd.conf
action: copy src=$files/kojibuilder/idmapd.conf dest=/etc/idmapd.conf
action: copy src="{{ files }}/kojibuilder/idmapd.conf" dest=/etc/idmapd.conf
tags:
- configs
- name: enable nfs-related services and run them
action: service name=$item enabled=true state=started
action: service name={{ item }} enabled=true state=started
with_items:
- rpcidmapd
- rpcbind
@ -106,7 +106,7 @@
- nfslock
- name: route config for netapp network
action: copy src=$files/kojibuilder/route-eth1 dest=/etc/sysconfig/network-scripts/route-eth1
action: copy src="{{ files }}/kojibuilder/route-eth1" dest=/etc/sysconfig/network-scripts/route-eth1
- name: run netapp route
command: /etc/sysconfig/network-scripts/ifup-routes eth1
@ -122,7 +122,7 @@
# mock configs for pungify job
# TODO: restore this to "copy:", this is a temporary "fix" for https://github.com/ansible/ansible/issues/4377
- name: put extra special mock configs in
template: src=$files/kojibuilder/builders/$item dest=/etc/mock/$item mode=644
template: src="{{ files }}/kojibuilder/builders/{{ item }}" dest="/etc/mock/{{ item }}" mode=644
with_items:
- fedora-branched-pungi-armhfp.cfg
- fedora-branched-pungi-i386.cfg
@ -132,14 +132,14 @@
- fedora-rawhide-pungi-armhfp.cfg
- name: mock site-defaults.cfg
action: copy src=$files/kojibuilder/builders/site-defaults.cfg dest=/etc/mock/site-defaults.cfg mode=0644 owner=root group=mock
action: copy src="{{ files }}/kojibuilder/builders/site-defaults.cfg" dest=/etc/mock/site-defaults.cfg mode=0644 owner=root group=mock
when: not inventory_hostname.startswith('bkernel')
- name: ntp steptickers
action: copy src=$files/common/step-tickers dest=/etc/ntp/step-tickers
action: copy src="{{ files }}/common/step-tickers" dest=/etc/ntp/step-tickers
- name: ntp.conf
action: copy src=$files/common/ntp.conf dest=/etc/ntp.conf
action: copy src="{{ files }}/common/ntp.conf" dest=/etc/ntp.conf
- name: enable ntpd
action: service name=ntpd enabled=true state=started

View file

@ -1,6 +1,6 @@
---
- name: add pkgs for bkernel boxes
action: yum state=latest pkg=$item enablerepo=epel-test
action: yum state=latest pkg={{ item }} enablerepo=epel-test
with_items:
- pesign
- ccid
@ -22,11 +22,11 @@
action: service name=pesign state=started enabled=true
- name: when you awake you will remember nothing
action: copy src=$files/kojibuilder/history_off.sh dest=/etc/profile.d/history_off.sh mode=0644
action: copy src="{{ files }}/kojibuilder/history_off.sh" dest=/etc/profile.d/history_off.sh mode=0644
- name: mock site-defaults.cfg
action: copy src=$files/kojibuilder/builders/bkernel-site-defaults.cfg dest=/etc/mock/site-defaults.cfg mode=0644 owner=root group=mock
action: copy src="{{ files }}/kojibuilder/builders/bkernel-site-defaults.cfg" dest=/etc/mock/site-defaults.cfg mode=0644 owner=root group=mock
- name: make sure our bkernel boxes have static ip
action: template src=$files/kojibuilder/builders/bkernel-eth0-network dest=/etc/sysconfig/network-scripts/ifcfg-eth0
action: template src="{{ files }}/kojibuilder/builders/bkernel-eth0-network" dest=/etc/sysconfig/network-scripts/ifcfg-eth0

View file

@ -5,7 +5,7 @@
action: command /sbin/grubby --update-kernel=ALL --args=max_loop=64
- name: special pkgs for the x86_64 builders
yum: state=installed pkg=$item
yum: state=installed pkg={{ item }}
with_items:
- kmod-hfsplus
when: is_rhel == 'True'

View file

@ -1,5 +1,5 @@
- name: set root passwd
action: user name=root password=$builder_rootpw state=present
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
@ -8,7 +8,7 @@
- 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/kojibuilder/mock_auth_keys dest=/var/lib/mock/.ssh/authorized_keys mode=644 owner=mock group=mock
action: copy src="{{ files }}/kojibuilder/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
@ -17,7 +17,7 @@
action: user name=ftpsync uid=263 group=ftpsync system=yes home=/var/tmp/ftpsync 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
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
@ -28,18 +28,18 @@
- 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
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
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
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
action: copy src="{{ private }}/files/koji/buildercerts/fedora-ca.cert" dest=/home/masher/.fedora-server-ca.cert
# rawhide group
- name: rawhide group
@ -49,7 +49,7 @@
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
action: file state=directory path={{ item }}
with_items:
- /pub
- /pub/fedora
@ -67,17 +67,17 @@
action: file src=/mnt/fedora_koji/compose/cache dest=/srv/pungi/cache state=link
- name: add builder infra yum repo
action: copy src=$files/kojibuilder/builder-infrastructure.repo dest=/etc/yum.repos.d/builder-infrastructure.repo
action: copy src="{{ files }}/kojibuilder/builder-infrastructure.repo" dest=/etc/yum.repos.d/builder-infrastructure.repo
tags:
- configs
- name: add releng yum repo
action: copy src=$files/releng/releng.repo dest=/etc/yum.repos.d/releng.repo
action: copy src="{{ files }}/releng/releng.repo" dest=/etc/yum.repos.d/releng.repo
tags:
- configs
- name: add pkgs
action: yum state=installed pkg=$item
action: yum state=installed pkg={{ item }}
with_items:
- yum-utils
- koji
@ -93,12 +93,12 @@
- pykickstart
- name: /etc/koji/koji.conf
action: copy src=$files/kojibuilder/koji.conf dest=/etc/koji.conf
action: copy src="{{ files }}/kojibuilder/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
action: copy src="{{ files }}/releng/{{ item }}" dest="/etc/mock/{{ item }}" mode=644
with_items:
- fedora-branched-compose-armhfp.cfg
- fedora-rawhide-compose-armhfp.cfg
@ -109,12 +109,12 @@
# idmapd and make sure it's set to run
- name: idmapd.conf
action: copy src=$files/kojibuilder/idmapd.conf dest=/etc/idmapd.conf
action: copy src="{{ files }}/kojibuilder/idmapd.conf" dest=/etc/idmapd.conf
tags:
- configs
- name: enable nfs-related services and run them
action: service name=$item enabled=true state=started
action: service name={{ item }} enabled=true state=started
with_items:
- rpcidmapd
- rpcbind
@ -123,7 +123,7 @@
- name: route to netapp network
action: copy src=$files/kojibuilder/route-eth1 dest=/etc/sysconfig/network-scripts/route-eth1
action: copy src="{{ files }}/kojibuilder/route-eth1" dest=/etc/sysconfig/network-scripts/route-eth1
notify:
- restart netapproute
@ -138,26 +138,26 @@
# put cron job in for branched compose
- name: branched compose cron
action: copy src=$files/releng/branched dest=/etc/cron.d/branched
action: copy src="{{ files }}/releng/branched" dest=/etc/cron.d/branched
when: inventory_hostname.startswith('releng01')
# put cron job in for rawhide compose
- name: rawhide compose cron
action: copy src=$files/releng/rawhide dest=/etc/cron.d/rawhide
action: copy src="{{ files }}/releng/rawhide" dest=/etc/cron.d/rawhide
when: inventory_hostname.startswith('releng02')
- name: sudoers defaults
action: copy src=$private/files/sudo/releng-sudoers dest=/etc/sudoers mode=0440
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
action: copy src="{{ private }}/files/sudo/ftpsync-sudo" dest=/etc/sudoers.d/ftpsync mode=0440
tags:
- configs
# fedmsg message buss stuff.
- name: fedmsg install
action: yum state=installed pkg=$item
action: yum state=installed pkg={{ item }}
with_items:
- fedmsg
# needed for now, until moksha 0.8.8-4 pulls it in.
@ -173,7 +173,7 @@
tags:
- fedmsg
- name: fedmsg files
action: copy src=$files/releng/fedmsg/$item dest=/etc/fedmsg.d/$item mode=644
action: copy src="{{ files }}/releng/fedmsg/{{ item }}" dest="/etc/fedmsg.d/{{ item }}" mode=644
with_items:
- ircbot.py
- ssl.py
@ -182,32 +182,32 @@
tags:
- fedmsg
- name: fedmsg ca
action: copy src=$private/files/fedmsg-certs/keys/$item dest=/etc/pki/fedmsg/$item mode=644
action: copy src="{{ private }}/files/fedmsg-certs/keys/{{ item }}" dest="/etc/pki/fedmsg/{{ item }}" mode=644
with_items:
- ca.crt
- name: fedmsg cert
action: copy src=$private/files/fedmsg-certs/keys/$item dest=/etc/pki/fedmsg/$item mode=644
action: copy src="{{ private }}/files/fedmsg-certs/keys/{{ item }}" dest="/etc/pki/fedmsg/{{ item }}" mode=644
with_items:
- bodhi-releng01.phx2.fedoraproject.org.crt
tags:
- fedmsg
when: inventory_hostname.startswith('releng01')
- name: fedmsg key
action: copy src=$private/files/fedmsg-certs/keys/$item dest=/etc/pki/fedmsg/$item mode=640 group=masher
action: copy src="{{ private }}/files/fedmsg-certs/keys/{{ item }}" dest="/etc/pki/fedmsg/{{ item }}" mode=640 group=masher
with_items:
- bodhi-releng01.phx2.fedoraproject.org.key
tags:
- fedmsg
when: inventory_hostname.startswith('releng01')
- name: fedmsg cert
action: copy src=$private/files/fedmsg-certs/keys/$item dest=/etc/pki/fedmsg/$item mode=644
action: copy src="{{ private }}/files/fedmsg-certs/keys/{{ item }}" dest="/etc/pki/fedmsg/{{ item }}" mode=644
with_items:
- bodhi-releng02.phx2.fedoraproject.org.crt
tags:
- fedmsg
when: inventory_hostname.startswith('releng02')
- name: fedmsg key
action: copy src=$private/files/fedmsg-certs/keys/$item dest=/etc/pki/fedmsg/$item mode=640 group=masher
action: copy src="{{ private }}/files/fedmsg-certs/keys/{{ item }}" dest="/etc/pki/fedmsg/{{ item }}" mode=640 group=masher
with_items:
- bodhi-releng02.phx2.fedoraproject.org.key
tags:

View file

@ -6,7 +6,7 @@
- packages
- name: wsgi.conf
copy: src=$files/mod_wsgi/wsgi.conf dest=/etc/httpd/conf.d/wsgi.conf
copy: src="{{ files }}/mod_wsgi/wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf
notify:
- restart apache
tags:

View file

@ -3,14 +3,14 @@
# Setup mysql server.
#
- name: install mysql server packages
yum: name=$item state=installed
yum: name={{ item }} state=installed
with_items:
- mysql-server
tags:
- packages
- name: install our my.cnf
copy: src=$files/mysql/my.cnf dest=/etc/my.cnf owner=root group=root mode=0644
copy: src="{{ files }}/mysql/my.cnf" dest=/etc/my.cnf owner=root group=root mode=0644
- name: Set mysql-server to run
service: name=mysqld enabled=yes state=running

View file

@ -6,35 +6,35 @@
- packages
- name: /etc/openvpn/ca.crt from vpn/openvpn/keys/ca.crt
copy: src=$puppet_private/vpn/openvpn/keys/ca.crt dest=/etc/openvpn/ca.crt mode=0600 owner=root group=root
copy: src="{{ puppet_private }}/vpn/openvpn/keys/ca.crt" dest=/etc/openvpn/ca.crt mode=0600 owner=root group=root
tags:
- config
notify:
- restart openvpn
- name: /etc/openvpn/crl.pem from vpn/openvpn/keys/crl.pem
copy: src=$puppet_private/vpn/openvpn/keys/crl.pem dest=/etc/openvpn/crl.pem mode=0644 owner=root group=root
copy: src="{{ puppet_private }}/vpn/openvpn/keys/crl.pem" dest=/etc/openvpn/crl.pem mode=0644 owner=root group=root
tags:
- config
notify:
- restart openvpn
- name: /etc/openvpn/openvpn.conf
copy: src=$files/openvpn/client.conf dest=/etc/openvpn/openvpn.conf
copy: src="{{ files }}/openvpn/client.conf" dest=/etc/openvpn/openvpn.conf
tags:
- config
notify:
- restart openvpn
- name: /etc/openvpn/client.crt
copy: src=$puppet_private/vpn/openvpn/keys/${inventory_hostname}.crt dest=/etc/openvpn/client.crt mode=0600 owner=root group=root
copy: src="{{ puppet_private }}/vpn/openvpn/keys/{{ inventory_hostname }}.crt" dest=/etc/openvpn/client.crt mode=0600 owner=root group=root
tags:
- config
notify:
- restart openvpn
- name: /etc/openvpn/client.key
copy: src=$puppet_private/vpn/openvpn/keys/${inventory_hostname}.key dest=/etc/openvpn/client.key mode=0600 owner=root group=root
copy: src="{{ puppet_private }}/vpn/openvpn/keys/{{ inventory_hostname }}.key" dest=/etc/openvpn/client.key mode=0600 owner=root group=root
tags:
- config
notify:

View file

@ -1,25 +1,25 @@
---
- name: check it out
local_action: shell nc -d -z -w 5 ${inventory_hostname} 22 >>/dev/null
local_action: shell nc -d -z -w 5 {{ inventory_hostname }} 22 >>/dev/null
register: host_is_up
ignore_errors: true
- name: spin it up
local_action: ec2 keypair=${keypair} image=${image} type=${instance_type} wait=true group=${security_group} ec2_access_key=$persist_access_key ec2_secret_key=$persist_secret_key ec2_url=$os_ec2_url
local_action: ec2 keypair={{ keypair }} image={{ image }} type={{ instance_type }} wait=true group={{ security_group }} ec2_access_key={{ persist_access_key }} ec2_secret_key={{ persist_secret_key }} ec2_url={{ os_ec2_url }}
register: inst_res
when: host_is_up|failed
- name: assign it a special ip
local_action: shell euca-associate-address --config ${persist_config} -i ${inst_res.instances[0].id} ${public_ip}
local_action: shell euca-associate-address --config {{ persist_config }} -i {{ inst_res.instances[0].id }} {{ public_ip }}
when: host_is_up|failed
- name: wait for the reassignation
local_action: wait_for host=${public_ip} port=22 delay=20 timeout=300
local_action: wait_for host={{ public_ip }} port=22 delay=20 timeout=300
when: host_is_up|failed
# attach and mount volumes
- name: attach volumes to the system
local_action: shell euca-attach-volume --config ${persist_config} -i ${inst_res.instances[0].id} $item
with_items: $volumes
local_action: shell euca-attach-volume --config {{ persist_config }} -i {{ inst_res.instances[0].id }} {{ item }}
with_items: "{{ volumes }}"
when: volumes is defined and host_is_up|failed

View file

@ -5,14 +5,14 @@
- packages
- name: /etc/postfix/main.cf
action: copy src=$item dest=/etc/postfix/main.cf
action: copy src={{ item }} dest=/etc/postfix/main.cf
with_first_found:
- $postfix_maincf
- $files/postfix/main.cf.${ansible_fqdn}
- $files/postfix/main.cf.${inventory_hostname}
- $files/postfix/main.cf.${host_group}
- $files/postfix/main.cf.${postfix_group}
- $files/postfix/main.cf
- "{{ postfix_maincf }}"
- "{{ files }}/postfix/main.cf.{{ ansible_fqdn }}"
- "{{ files }}/postfix/main.cf.{{ inventory_hostname }}"
- "{{ files }}/postfix/main.cf.{{ host_group }}"
- "{{ files }}/postfix/main.cf.{{ postfix_group }}"
- "{{ files }}/postfix/main.cf"
notify:
- restart postfix
tags:

View file

@ -1,7 +1,7 @@
---
# tasklist for setting up a rdiff backup server.
- name: install rdiff-backup
yum: pkg=$item state=installed
yum: pkg={{ item }} state=installed
with_items:
- rdiff-backup
- git
@ -10,11 +10,11 @@
- packages
- name: setup rdiff backup script
copy: src=$files/rdiff-backup/run-rdiff-backups dest=/usr/local/bin/run-rdiff-backups mode=755
copy: src="{{ files }}/rdiff-backup/run-rdiff-backups" dest=/usr/local/bin/run-rdiff-backups mode=755
tags:
- config
- name: setup rdiff backup cron
copy: src=$files/rdiff-backup/run-rdiff-backups.cron dest=/etc/cron.d/run-rdiff-backups
copy: src="{{ files }}/rdiff-backup/run-rdiff-backups.cron" dest=/etc/cron.d/run-rdiff-backups
tags:
- config

View file

@ -1,7 +1,7 @@
---
- name: upstart serial setup
action: copy src=$files/common/ttyS0.conf dest=/etc/init/ttyS0.conf
action: copy src="{{ files }}/common/ttyS0.conf" dest=/etc/init/ttyS0.conf
when: is_rhel == 'True'
tags:
- configs

View file

@ -1,7 +1,7 @@
---
- name: put builder-repo on system
action: copy src=$files/sign/$item dest=/etc/yum.repos.d/$item
action: copy src="{{ files }}/sign/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- builder-rpms.repo
when: is_rhel == 'True'
@ -10,7 +10,7 @@
- packages
- name: install sigul
action: yum state=installed name=$item
action: yum state=installed name={{ item }}
with_items:
- sigul
- ntp
@ -20,24 +20,24 @@
- packages
- name: setup /etc/sigul/bridge.conf file
action: template src=$files/sign/bridge.conf.j2 dest=/etc/sigul/bridge.conf owner=root group=sigul mode=640
action: template src="{{ files }}/sign/bridge.conf.j2" dest=/etc/sigul/bridge.conf owner=root group=sigul mode=640
tags:
- config
- name: setup /etc/sigul/server.conf file
action: copy src=$files/sign/server.conf dest=/etc/sigul/server.conf owner=root group=sigul mode=640
action: copy src="{{ files }}/sign/server.conf" dest=/etc/sigul/server.conf owner=root group=sigul mode=640
- name: ntp steptickers
action: copy src=$files/common/step-tickers dest=/etc/ntp/step-tickers
action: copy src="{{ files }}/common/step-tickers" dest=/etc/ntp/step-tickers
- name: ntp.conf
action: copy src=$files/common/ntp.conf dest=/etc/ntp.conf
action: copy src="{{ files }}/common/ntp.conf" dest=/etc/ntp.conf
- name: enable ntpd
action: service name=ntpd enabled=true state=started
- name: /etc/hosts
action: copy src=$files/hosts/sign-hosts dest=/etc/hosts
action: copy src="{{ files }}/hosts/sign-hosts" dest=/etc/hosts
tags:
- configs

View file

@ -7,16 +7,16 @@
# Put in place the default sysadmin-main sudoers file.
#
- name: setup /etc/sudoers.d/sysadmin-main
action: copy src=$private/files/sudo/sysadmin-main dest=/etc/sudoers.d/ owner=root group=root mode=0600
action: copy src="{{ private }}/files/sudo/sysadmin-main" dest=/etc/sudoers.d/ owner=root group=root mode=0600
tags:
- config
#
# This will move a /etc/sudoers.d/ file in place
#
- name: setup /etc/sudoers.d/sudoer file for client use
action: copy src=$item dest=/etc/sudoers.d/ owner=root group=root mode=0600
action: copy src={{ item }} dest=/etc/sudoers.d/ owner=root group=root mode=0600
with_first_found:
- files: ${sudoers} ${private}/files/sudo/${ansible_fqdn}-sudoers ${private}/files/sudo/${ansible_hostname}-sudoers ${private}/files/sudo/${ansible_domain}-sudoers
- files: "{{ sudoers }}" "{{ private }}/files/sudo/{{ ansible_fqdn }}-sudoers" "{{ private }}/files/sudo/{{ ansible_hostname }}-sudoers" "{{ private }}/files/sudo/{{ ansible_domain }}-sudoers"
skip: true
tags:
- config

View file

@ -1,16 +1,16 @@
---
- name: spin it up
local_action: ec2 keypair=${keypair} image=${image} type=${instance_type} wait=true group=${security_group} ec2_access_key=$transient_access_key ec2_secret_key=$transient_secret_key ec2_url=$os_ec2_url
local_action: ec2 keypair={{ keypair }} image={{ image }} type={{ instance_type }} wait=true group={{ security_group }} ec2_access_key={{ transient_access_key }} ec2_secret_key={{ transient_secret_key }} ec2_url={{ os_ec2_url }}
register: inst_res
- name: add it to the special group
local_action: add_host hostname=${inst_res.instances[0].public_ip} groupname=tmp_just_created
local_action: add_host hostname={{ inst_res.instances[0].public_ip }} groupname=tmp_just_created
- name: mail off about where it is
local_action: mail to=sysadmin-main-members@fedoraproject.org from=ansible-create@fedoraproject.org subject=${inst_res.instances[0].public_ip} msg="cloud instance created on ${inst_res.instances[0].public_ip}\n instance id - ${inst_res.instances[0].id} - ${hostbase} ${root_auth_users} "
local_action: mail to=sysadmin-main-members@fedoraproject.org from=ansible-create@fedoraproject.org subject={{ inst_res.instances[0].public_ip }} msg="cloud instance created on {{ inst_res.instances[0].public_ip }}\n instance id - {{ inst_res.instances[0].id }} - {{ hostbase }} {{ root_auth_users }} "
- name: wait for the host to be hot
local_action: wait_for host=${inst_res.instances[0].public_ip} port=22 delay=2 timeout=300
local_action: wait_for host={{ inst_res.instances[0].public_ip }} port=22 delay=2 timeout=300

View file

@ -5,7 +5,7 @@
selinux: policy=targeted state=enforcing
- name: install libvirt packages
yum: pkg=$item state=installed
yum: pkg={{ item }} state=installed
with_items:
- qemu-kvm
- libvirt
@ -18,7 +18,7 @@
# This provides us with the ability to use virt-manager from non root accounts.
#
- name: install libvirtd.conf
copy: src=$files/virthost/libvirtd.conf dest=/etc/libvirt/libvirtd.conf
copy: src="{{ files }}/virthost/libvirtd.conf" dest=/etc/libvirt/libvirtd.conf
notify:
- restart libvirtd
tags:

View file

@ -1,6 +1,6 @@
---
- name: put rhel repos on system
action: copy src=$files/common/$item dest=/etc/yum.repos.d/$item
action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- epel6.repo
- rhel6.repo
@ -10,7 +10,7 @@
- packages
- name: put fedora repos on x86 systems
action: copy src=$files/common/$item dest=/etc/yum.repos.d/$item
action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- fedora.repo
- fedora-updates.repo
@ -21,7 +21,7 @@
- packages
- name: put fedora repos on arm systems
action: copy src=$files/common/$item-arm dest=/etc/yum.repos.d/$item
action: copy src="{{ files }}/common/{{ item-arm }}" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- fedora.repo
- fedora-updates.repo
@ -32,7 +32,7 @@
- packages
- name: add infrastructure repo
action: copy src=$files/common/$item dest=/etc/yum.repos.d/$item
action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- infrastructure.repo
- infrastructure-testing.repo