]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Rename ansible-reserved port var to jenkins_port
authorDavid Galloway <dgallowa@redhat.com>
Thu, 3 Aug 2017 15:35:48 +0000 (11:35 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 22 Aug 2017 14:42:45 +0000 (10:42 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
ansible/examples/master.yml
ansible/roles/ansible-jenkins/defaults/main.yml
ansible/roles/ansible-jenkins/handlers/main.yml
ansible/roles/ansible-jenkins/tasks/config.yml
ansible/roles/ansible-jenkins/tasks/plugins.yml

index 6f3a792f8bbd975aa5caf24669fa1ce67a31d5cc..6216f9a80af641e2e550d114519df4632b8fb486 100644 (file)
@@ -36,7 +36,7 @@
       - 'postbuildscript'
       - 'jobConfigHistory'
 
-    - port: 8080
+    - jenkins_port: 8080
     - prefix: '/build'
     - xmx: 8192
     # Email support
index c8e3ee83970308ec263b165cdd9eaf22436db969..92034a07fe6f02b28ef1d4a73ac6e7c7b3021bad 100644 (file)
@@ -1,6 +1,6 @@
 ---
 placeholder: 'placeholder'
-port: 8080
+jenkins_port: 8080
 # plugins:
 #   - 'ldap'
 #   - 'github'
index 6ea5b8f3de8cfeaec916268d9fc9f19b873d8af9..759b833a9b55852ec20dbb4ecb9bd0e647065b56 100644 (file)
@@ -1,6 +1,6 @@
 # Safe-restart Jenkins
 - name: restart jenkins
-  command: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ port }} safe-restart
+  command: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ jenkins_port }} safe-restart
 
 - name: restart nginx
   service:
index efdc8fad46949fb4dd93c555ada17df18b9d1ead..4dec56289c3019344b28b912f3704be45ebdc1b3 100644 (file)
@@ -4,7 +4,7 @@
   lineinfile:
     dest: '{{ jenkins.apt.config_file }}'
     regexp: ^HTTP_PORT=
-    line: HTTP_PORT={{port}}
+    line: HTTP_PORT={{jenkins_port}}
     backrefs: yes
   register: config_changed
 
@@ -73,7 +73,7 @@
 - name: "{{ startup_delay_s | default(10) }}s delay while starting Jenkins"
   wait_for:
     host: localhost
-    port: '{{ port }}'
+    port: '{{ jenkins_port }}'
     delay: '{{ startup_delay_s | default(10) }}'
   when: jenkins_install.changed or config_changed.changed
 
@@ -84,7 +84,7 @@
 
 - name: Get Jenkins CLI
   get_url:
-    url: http://localhost:{{ port }}/jnlpJars/jenkins-cli.jar
+    url: http://localhost:{{ jenkins_port }}/jnlpJars/jenkins-cli.jar
     dest: '{{ jenkins.cli_dest }}'
     mode: 0440
   register: jenkins_local_cli
   register: jenkins_updates
 
 - name: Update-center Jenkins
-  shell: "cat {{ jenkins.updates_dest }} | sed '1d;$d' | curl -X POST -H 'Accept: application/json' -d @- http://localhost:{{ port }}/updateCenter/byId/default/postBack"
+  shell: "cat {{ jenkins.updates_dest }} | sed '1d;$d' | curl -X POST -H 'Accept: application/json' -d @- http://localhost:{{ jenkins_port }}/updateCenter/byId/default/postBack"
   when: jenkins_updates.changed
   notify:
     - 'restart jenkins'
index af68e6d92202120bb1457c0cea67b37c5924e8a8..0077aa017bbb0532fd35c881a18b00f9dc865b1e 100644 (file)
@@ -1,22 +1,22 @@
 ---
 - name: List plugins
-  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ port }} list-plugins | cut -f 1 -d ' '
+  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ jenkins_port }} list-plugins | cut -f 1 -d ' '
   when: plugins is defined
   register: plugins_installed
 
 - name: Install/update plugins
-  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ port }} install-plugin {{ item }}
+  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ jenkins_port }} install-plugin {{ item }}
   when: plugins_installed.changed and plugins_installed.stdout.find('{{ item }}') == -1
   with_items: plugins
   notify:
     - 'restart jenkins'
 
 - name: List plugins to be updated
-  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ port }} list-plugins | grep ')$' | cut -f 1 -d ' ' | sed ':a;N;$!ba;s/\n/ /g'
+  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ jenkins_port }} list-plugins | grep ')$' | cut -f 1 -d ' ' | sed ':a;N;$!ba;s/\n/ /g'
   register: plugins_updates
 
 - name: Update plugins
-  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ port }} install-plugin {{ item }}
+  shell: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ jenkins_port }} install-plugin {{ item }}
   with_items: plugins_updates.stdout.split()
   when: plugins_updates.stdout != ''
   ignore_errors: yes