From 55dc5dc19734bd02455bd289ce6eb3cd6fc424f6 Mon Sep 17 00:00:00 2001 From: Marek Sirovy Date: Fri, 1 Sep 2023 16:03:02 +0200 Subject: [PATCH] test-arm, backup scripts --- env/test-arm/group_vars/all/consul.yml | 38 + env/test-arm/group_vars/all/docker.yml | 19 + env/test-arm/group_vars/all/node_exporter.yml | 20 + env/test-arm/group_vars/all/nomad.yml | 80 ++ env/test-arm/group_vars/all/restic.yml | 29 + env/test-arm/group_vars/all/sshd.yml | 6 + env/test-arm/group_vars/all/vars.yml | 16 + env/test-arm/group_vars/all/vault.yml | 19 + env/test-arm/group_vars/all/vault_consul.yml | 9 + .../group_vars/all/vault_docker_config.yml | 14 + .../group_vars/all/vault_node_exporter.yml | 13 + env/test-arm/group_vars/all/vault_restic.yml | 13 + env/test-arm/group_vars/masters/consul.yml | 5 + env/test-arm/group_vars/masters/nomad.yml | 7 + .../group_vars/masters/nomad_init_secrets.yml | 22 + .../masters/vault_nomad_init_secrets.yml | 72 ++ env/test-arm/hosts | 24 + env/test-arm/vultr.yaml | 2 + env/test/group_vars/all/docker.yml | 19 + env/test/group_vars/all/node_exporter.yml | 20 + env/test/group_vars/all/sshd.yml | 6 + env/test/group_vars/all/vars.yml | 14 + env/test/group_vars/all/vault.yml | 13 + .../group_vars/all/vault_docker_config.yml | 14 + .../group_vars/all/vault_node_exporter.yml | 13 + env/test/hosts | 6 + files/scripts/mysql-dump-all.sh | 48 + new_ansible.cfg | 1057 +++++++++++++++++ 28 files changed, 1618 insertions(+) create mode 100755 env/test-arm/group_vars/all/consul.yml create mode 100755 env/test-arm/group_vars/all/docker.yml create mode 100755 env/test-arm/group_vars/all/node_exporter.yml create mode 100755 env/test-arm/group_vars/all/nomad.yml create mode 100755 env/test-arm/group_vars/all/restic.yml create mode 100755 env/test-arm/group_vars/all/sshd.yml create mode 100755 env/test-arm/group_vars/all/vars.yml create mode 100755 env/test-arm/group_vars/all/vault.yml create mode 100755 env/test-arm/group_vars/all/vault_consul.yml create mode 100755 env/test-arm/group_vars/all/vault_docker_config.yml create mode 100755 env/test-arm/group_vars/all/vault_node_exporter.yml create mode 100755 env/test-arm/group_vars/all/vault_restic.yml create mode 100755 env/test-arm/group_vars/masters/consul.yml create mode 100755 env/test-arm/group_vars/masters/nomad.yml create mode 100755 env/test-arm/group_vars/masters/nomad_init_secrets.yml create mode 100755 env/test-arm/group_vars/masters/vault_nomad_init_secrets.yml create mode 100755 env/test-arm/hosts create mode 100755 env/test-arm/vultr.yaml create mode 100755 env/test/group_vars/all/docker.yml create mode 100755 env/test/group_vars/all/node_exporter.yml create mode 100755 env/test/group_vars/all/sshd.yml create mode 100755 env/test/group_vars/all/vars.yml create mode 100755 env/test/group_vars/all/vault.yml create mode 100755 env/test/group_vars/all/vault_docker_config.yml create mode 100755 env/test/group_vars/all/vault_node_exporter.yml create mode 100755 env/test/hosts create mode 100755 files/scripts/mysql-dump-all.sh create mode 100644 new_ansible.cfg diff --git a/env/test-arm/group_vars/all/consul.yml b/env/test-arm/group_vars/all/consul.yml new file mode 100755 index 0000000..1aa68e3 --- /dev/null +++ b/env/test-arm/group_vars/all/consul.yml @@ -0,0 +1,38 @@ +# Consul +consul_group_name: cluster # ansible group used by consul +consul_datadir: /var/consul + +# Node role +consul_node_role: client +consul_ui: false +consul_server: false +consul_log_files_count: 2 +consul_client_addr: 0.0.0.0 +consul_bind_address: 0.0.0.0 +consul_addresses: + http: 0.0.0.0 + +# Listen only on LAN +#consul_advertise_address_wan: "{{ internal_ip }}" +#consul_advertise_address: "{{ internal_ip }}" + +# Listen on WAN +consul_advertise_address_wan: "{{ v4_main_ip | default(ansible_ssh_host)}}" +consul_advertise_address: "{{ v4_main_ip | default(ansible_ssh_host)}}" + +# DNSmasq +consul_dnsmasq_enable: true +consul_dnsmasq_listen_addresses: +- 172.17.0.1 +- 127.0.0.1 + +# Features +consul_connect_enabled: true +consul_ports_grpc: 8502 + + +# Hardening +#consul_acl_enable: true +#consul_default_policy: allow # deny +#consul_token_persistence: true +#consul_acl_master_token_display: true diff --git a/env/test-arm/group_vars/all/docker.yml b/env/test-arm/group_vars/all/docker.yml new file mode 100755 index 0000000..62d4a2e --- /dev/null +++ b/env/test-arm/group_vars/all/docker.yml @@ -0,0 +1,19 @@ +docker_daemon_options: + debug: false + experimental: true + + # !!! Don't stop running containers during updates !!! + # in some cases a default FIFO log size (64K) is not enought so increase + # the size there /proc/sys/fs/pipe-max-size + live-restore: true + + # default log driver will be loki +# log-driver: "loki" +# log-opts: +# loki-url: "https://localhost:3100/loki/api/v1/push" +# loki-batch-size: "100" +# max-file: "3" +# max-size: "10m" + + # Enable prometheus metrics endpoint + metrics-addr: "127.0.0.1:9323" diff --git a/env/test-arm/group_vars/all/node_exporter.yml b/env/test-arm/group_vars/all/node_exporter.yml new file mode 100755 index 0000000..68b27e2 --- /dev/null +++ b/env/test-arm/group_vars/all/node_exporter.yml @@ -0,0 +1,20 @@ +--- +node_exporter_web_telemetry_path: /metrics +node_exporter_textfile_dir: /tmp/metrics + +node_exporter_disabled_collectors: +- infiniband +- bonding +- mdadm +- nfsd +- powersupplyclass +- rapl +- zfs +- xfs + +node_exporter_enabled_collectors: +- systemd +- processes +- textfile: + directory: "{{ node_exporter_textfile_dir }}" + diff --git a/env/test-arm/group_vars/all/nomad.yml b/env/test-arm/group_vars/all/nomad.yml new file mode 100755 index 0000000..f0c3e7b --- /dev/null +++ b/env/test-arm/group_vars/all/nomad.yml @@ -0,0 +1,80 @@ +# Nomad +nomad_manage_group: true +nomad_group: nomad # unix user for nomad +nomad_group_name: cluster # ansible group used by nomad +nomad_config_dir: /etc/nomad # I don't like default /etc/nomad.d path +nomad_use_consul: false # Consul is not needed for establishing the cluster +nomad_consul_address: "localhost:8500" +nomad_acl_enabled: true +nomad_bind_address: 0.0.0.0 + +nomad_raft_protocol: 3 + +# In case you want to use internal network ip for nomad communication +# It is a good idea in a single DC cluster) +#nomad_advertise_address: "{{ internal_ip }}" +nomad_advertise_address: "{{ v4_main_ip | default(ansible_ssh_host)}}" + +# It's good idea to reserve a few resources to system +# if you plan to schedule applications on master node, +# reserved resources is highly recomended +nomad_reserved: + cpu: 500 + memory: 256 + disk: 5000 + reserved_ports: "22,4646,8500-8600" + + +# Prometheus metrics +nomad_telemetry: true +nomad_telemetry_publish_allocation_metrics: true +nomad_telemetry_publish_node_metrics: true +nomad_telemetry_prometheus_metrics: true + +# datadog monitoring +#nomad_telemetry_datadog_address: "localhost:8125" + + +# in production cluster it should be encrypted in vault +nomad_encrypt: 3pa39lgTF/jt1OZZckld5P/5FCkm0pJXI5J4V9LY9eo= + +# enable raw exec to be able manage all services directly +# enable local volumes to be able mount hosts directory to container +nomad_options: + driver.raw_exec.enable: "1" + docker.volumes.enabled: "1" + + # clean wasted images after 1h + docker.cleanup.image.delay: "1h" + + + # Required by host_path CSI plugin + docker.privileged.enabled: "true" + + + +nomad_plugins: + docker: + # If you have systemd for example in container this is required + # privileged: + # enabled: true + cleanup: + image: true + container: true + config: + # If you uses private docker registry + auth: + config: "/root/.docker/config.json" + + volumes: + enabled: true + + # configure labels added to docker containers + extra_labels: + - job_name + - task_group_name + - task_name + - namespace + - node_name + + diff --git a/env/test-arm/group_vars/all/restic.yml b/env/test-arm/group_vars/all/restic.yml new file mode 100755 index 0000000..f9ba7ce --- /dev/null +++ b/env/test-arm/group_vars/all/restic.yml @@ -0,0 +1,29 @@ +--- +restic_log_dir: /var/log/restic +restic_create_cron: true +metrics_dir: "{{ node_exporter_textfile_dir }}" +restic_repos: + remote: + location: "s3:s3.eu-central-1.amazonaws.com/restic-theztd-backup/{{ ansible_hostname }}" + password: "{{ vault_restic_password }}" + aws_access_key: "{{ vault_aws_restic_key }}" + aws_secret_access_key: "{{ vault_aws_restic_secret }}" + +restic_backups: + home: + name: home + repo: remote + src: /home + scheduled: true + schedule_oncalendar: '*-*-* 06..19:40:00' + docker_volumes: + name: docker_volumes + repo: remote + src: /var/lib/docker/volumes + tags: + - docker_volume + scheduled: true + schedule_oncalendar: '*-*-* 06..19:50:00' + keep_hourly: 12 + keep_daily: 20 + diff --git a/env/test-arm/group_vars/all/sshd.yml b/env/test-arm/group_vars/all/sshd.yml new file mode 100755 index 0000000..d1ef083 --- /dev/null +++ b/env/test-arm/group_vars/all/sshd.yml @@ -0,0 +1,6 @@ +--- +sshd_ports: +- 65022 +- 22 + +sshd_client_alive_interval: 3600 diff --git a/env/test-arm/group_vars/all/vars.yml b/env/test-arm/group_vars/all/vars.yml new file mode 100755 index 0000000..40b0eea --- /dev/null +++ b/env/test-arm/group_vars/all/vars.yml @@ -0,0 +1,16 @@ +--- +admin_email: msirovy@gmail.com + +resolv: + search: fejk.net + nameservers: + - 1.1.1.1 + - 8.8.8.8 + +root_keys: +- keys/marek +- keys/github + +s3cmd_conf: + bucket_location: eu-central-1 + diff --git a/env/test-arm/group_vars/all/vault.yml b/env/test-arm/group_vars/all/vault.yml new file mode 100755 index 0000000..96d2a53 --- /dev/null +++ b/env/test-arm/group_vars/all/vault.yml @@ -0,0 +1,19 @@ +$ANSIBLE_VAULT;1.1;AES256 +65396430346134336530386663363363643663623938613630383863363036663734336661626534 +3264646461653531346466303939366432386537356133330a636131613630393630373937323036 +32303039626635383830323632653564646363363535306332636633363932333966383632646364 +3965316566326632330a326164643835306638366432393232366434626531633634343732306237 +65646561366636306532623266646332643334303731366437313765396565333663636161653937 +61373937663464346665353932383839356331383066393138663131363637636363343231333433 +35656363353839323663363934303837393738333039336361643631356131666432313064356535 +66633330336530643632343331303663633636663565306563626330626561346435363961363734 +39306132366165613664316466623261326433666364363336366563306463613936303632383035 +64303861323862323362326330633963333231633761663862656537386238303663363562626233 +63303662373134326663613331323365383234373164633637336138316565383164633932323736 +32303230373761366461633535613263613032303436336563626330656436313337636335376165 +66333566323130303232366661363336356631623861336636386464613364393135386434306234 +39376663646635323537306137363963633136303663323837633463653434376239396237386364 +32363433623538356334356263623535613731383038646239626232613033326464303031643931 +32356563626566393334323162373761633936353964633462646661393232633934323634356636 +36383637623632393034303265366338353733313062366433373965373463373337356666303965 +3933336534333065356239653139616465326539613665326333 diff --git a/env/test-arm/group_vars/all/vault_consul.yml b/env/test-arm/group_vars/all/vault_consul.yml new file mode 100755 index 0000000..4110d57 --- /dev/null +++ b/env/test-arm/group_vars/all/vault_consul.yml @@ -0,0 +1,9 @@ +$ANSIBLE_VAULT;1.1;AES256 +30613137383636633131376366656165303363333961326666323363336636626133363739396163 +3639333762636265303439623463393465363663303237330a313163366537646461363365346164 +33366239636266386364623062643237303965363636653232653437616534356331343631356638 +6366363736353431650a313764346336346435626462303935373635343161633035376139313064 +39366533663036343433373239393634656637353939386538633062376437666264333134363030 +30663933366232653938616665353162336331383264613739306633626564333939373836393133 +35376664663231376439313635663835313032623036613863666534303665383330306262316532 +61303937643933313966 diff --git a/env/test-arm/group_vars/all/vault_docker_config.yml b/env/test-arm/group_vars/all/vault_docker_config.yml new file mode 100755 index 0000000..84334e0 --- /dev/null +++ b/env/test-arm/group_vars/all/vault_docker_config.yml @@ -0,0 +1,14 @@ +$ANSIBLE_VAULT;1.1;AES256 +35333734616533393565663161653865626230303961303262323835626462366630376230383466 +3732366436663061633166376461366163636436653936370a336536633734383534346234353665 +35656565663466626465313534626461373264393133316431646461616435393865353063663337 +3536346437646430610a613531363937663334323134346138346161333762613932363634326265 +35363739313038656562636338363935323364343230376332313630386661356463386436663964 +30313532303739666238376164313138346532313261346637633963653732663539663036626534 +33353935626666633936346431663130383130326466323031623031633730653566636164346339 +39636438366637343433613261663964326265333338353431613232663561303461663266373261 +31313932313933663931363630323637636130396639303464386239666337613662646562663866 +31366430616531303530653138623535353466343666663431393962346636393362303364633439 +63643835333435363539646334373537393032393031383338653132623933393461663933303936 +63623262653261326436343333333062323934653937653362383330333161303937363836313332 +39313961343037313265333364366361323365343831393762333834636465343730 diff --git a/env/test-arm/group_vars/all/vault_node_exporter.yml b/env/test-arm/group_vars/all/vault_node_exporter.yml new file mode 100755 index 0000000..8fceab7 --- /dev/null +++ b/env/test-arm/group_vars/all/vault_node_exporter.yml @@ -0,0 +1,13 @@ +$ANSIBLE_VAULT;1.1;AES256 +36323638326232623266376634666435353366306632653437396132653762313765316234333163 +3964366565303034356666353239666530333636303835360a333139656432373932393464343861 +32373533653634643463613930396132633736616465303138376264653839633832393435613532 +6334313732303763360a643365623562303533363332376238626239386334313734336234343461 +35313939356465376332336263346361316632356536663161323932636562303261376666373135 +39626539303238623231666233393234313831356465613131613832303133303161383237643138 +32366139373939336438633835343962373966303530616562663562383163313264386664376365 +64393837336531393965656635643262373536303234353239393138303265646534626666623237 +62623366303861353732653862373939616230653965653565306666393766356665353739643161 +61313865303162636436633733363938663730353732313134326336623165343233343230303261 +38303362366333346233666166656261336234653338353566373335666634313331383263373933 +36323462313935656638 diff --git a/env/test-arm/group_vars/all/vault_restic.yml b/env/test-arm/group_vars/all/vault_restic.yml new file mode 100755 index 0000000..7a49680 --- /dev/null +++ b/env/test-arm/group_vars/all/vault_restic.yml @@ -0,0 +1,13 @@ +$ANSIBLE_VAULT;1.1;AES256 +62346561353465613833653232323265653830393232396237366665326566396633383162613937 +3362366136366336643438383537303435663436356164390a613966323661383637303063386366 +62343962306566396634353138613532333039383962373631643566316131666563626631366433 +3231636462363865340a353335303633343739316435313335346335316636386335386463396466 +38653064643463373962663262663363623634623763616434623535353930313763353030356435 +37666636636238386566313265616533633563313331666265623562616263363538653735393962 +35376166353963633562323961353461313866353664306534386337343834363230396633386432 +39386334613832653935333064333163616433333965613665663533613432656361333536393433 +31396135633631643132343138626362633132316561626637316430303837333637663533663533 +63626162613563303531306465666562613732316533396431383031633238393935653838383539 +36353834383938353831363765633434623165363537353530653236363734653666336665643234 +65396432353464343964 diff --git a/env/test-arm/group_vars/masters/consul.yml b/env/test-arm/group_vars/masters/consul.yml new file mode 100755 index 0000000..b35b3af --- /dev/null +++ b/env/test-arm/group_vars/masters/consul.yml @@ -0,0 +1,5 @@ +--- +consul_node_role: masters +consul_server: true +consul_ui: true +consul_node_role: bootstrap diff --git a/env/test-arm/group_vars/masters/nomad.yml b/env/test-arm/group_vars/masters/nomad.yml new file mode 100755 index 0000000..89fdc64 --- /dev/null +++ b/env/test-arm/group_vars/masters/nomad.yml @@ -0,0 +1,7 @@ +nomad_node_role: both +consul_node_role: server + +nomad_meta: + role: master + region: globe + env: dc1 diff --git a/env/test-arm/group_vars/masters/nomad_init_secrets.yml b/env/test-arm/group_vars/masters/nomad_init_secrets.yml new file mode 100755 index 0000000..415eda5 --- /dev/null +++ b/env/test-arm/group_vars/masters/nomad_init_secrets.yml @@ -0,0 +1,22 @@ +--- +# +# EXAMPLE +# + +#nomad_init_secrets: +#- name: klic1 +# content: | +# namespace = "system" +# path = "hokus/pokus" +# items { +# klic1 = "hodnota1" +# } +# +#- name: klic2 +# content: | +# namespace = "default" +# path = "testik/karel/123" +# items { +# name = "Karlik" +# age = 33 +# } diff --git a/env/test-arm/group_vars/masters/vault_nomad_init_secrets.yml b/env/test-arm/group_vars/masters/vault_nomad_init_secrets.yml new file mode 100755 index 0000000..2ad4ea6 --- /dev/null +++ b/env/test-arm/group_vars/masters/vault_nomad_init_secrets.yml @@ -0,0 +1,72 @@ +$ANSIBLE_VAULT;1.1;AES256 +63383932343133306665663833393339633366613934663032666534663461353632303030626263 +3037623632653932316231356662663233363261363065620a353030663431376136323831373662 +34636364363935326632353435356538623861653230653439646232303165333337626139386336 +6636306633633765660a653034643361323261353735306462616261646535366461323664343066 +37386634303564646162303965613139373436336236613362356464623630613832636365336433 +66623932343331353832343334313461323966333634306234336262636464373135366339333631 +37386561643532303862373665663365303537616666613261313561373263373835656638613165 +30353464363532366466356566383939303565383335366363336566666566333735326436356633 +36393535656336366365306466663966656139376538626366643334613563633632366361656163 +62613439383034366230373130363766363230383630623466326630613862623032303437306162 +62633339313565653964373462666235353861653931343033383736343935396437646264303031 +66613137663635383338643133663635643535663239393837666433343131643063393266386265 +37383138653164643666343366313666343463653464366537386166626435643131346138373435 +64333134373462653235356435633562363935386534653832323165396131613361303864386339 +62386265666534333734373461643165376262393564383832313562613163616233303335613737 +39613639376538396637373432363238343064363961663438323163643234646533396630396464 +32343630663166323464393138366232646666663139316137653030626161343932343434313562 +32373961646433316361396164623639383036656365366165616563313737353531393063393764 +39373766626530353634626161326234396634643365396134306563656234656562633835636462 +34373232333661383666323530366262393534353263353062343663336566633633383138336234 +35393064623533636365386565323338643737663432656232616234643933623161633233303863 +35333838613535313064316666393230666661323236626137326632376439626636336537383039 +33623362646635646337616538653763383866316338343636363766313666303862393638326534 +31613766323737653138316236336630373539333535653930336233313730313735333864306334 +62323732333766386233626236626134393865616336366331323961313461663732623833643436 +30373730656131396431396238386337636563616462643333313438643838336466333362366262 +34393331353134646636613764343262366231396234616430653137323837336463343237323666 +31396533313332323033366361376465303837643261353061613765396665386133303437653666 +64386464363061306436396664396138336534643933323230343231393238616266636463663438 +32623461333665366565356661643464353937626563326165333836393439303363346630663662 +66386235656438623635636164663364336166343938333136383166316337613066656336636263 +65396434333637643330323530303434363638303733386664633431386165363633643839653066 +64636563316337396563646135663635653664323837613030333933646331386538666337343961 +62656662336461636463313161653364323738313962623435626431386364306537343838666661 +37386631636365303932626133616536313332656636396363646337396132363834326433623735 +66363837333662333030363831613534666231353964613565383538353034656539626265323662 +37623363336239353838633065653936393633313835616663393966333733313435323964363839 +65316239666333353133626366646662373839633835663961333032373333343864643561326232 +62323735386531623961306134306130643436303730353530383338326332383666613736316232 +65633031326563313562653461373734653234613033326363663735613564373461636432333237 +63306265653862386131393863383339633134633834316434646539333563656166346533303638 +37366663656261626231373864376339653964636338353162353539623262376134326330663137 +34353438393562393532303965396266303262623735613134313362386531343036313039623233 +37366161376132616563633932303563373764313233313532303866316165306135663138366439 +31333662373030643236663338316237386561356231366165353231336161376130393261376538 +31653432333933323166363739626436313030336164343232656666313432636134343331616133 +66313766636232643237633462666164373365353731376336363936653736666364623663336566 +34636363626561353231646132373738333338376130646536336535626639346534633535633464 +38613765613139363439643932633032313138613432343939643735643831616236653736626361 +39393839623434356562623638393662343038636237326661656639356236383430333564396630 +35363536613034393062653137396266653335376430393938343634383630363461313766636237 +38316534336463386133653730653165336137306536393131613665623539346164636534316463 +37346164306336656466376533613932626364343832386165386231333938333030633165373236 +39326635653737623163316237613033316563323436353531613662623765656636653065396330 +33356364316562396265303339383130326138653132633964386262306437383535383136346264 +66623466373236666134303937386230626565623836353232633765373932393839363434643662 +66373834373331393435323066666432313234393332636165393433333137306235356633323537 +32383336386130623366646433386233376235616462613930643431373534366261653465343630 +63663061376338326663356136356634666439636134303537363431396662666634326337373861 +30313561383033356363383166383565636533383432383064616264346134343461393536333031 +63643832363064626464656566323065313532663333373235623834303064323537636539643934 +61363536616364346338663631336137393661613461343862373663326363356236333931616430 +61333266356432396238323462353030663434653962393239653362343132343561323964313536 +62313065646239363230663633666265356332663535623131613164386330633231656563653437 +36393434376435303665653030616439633163613634373265653235666434623064653761613330 +31333930363630353137363063653838353764633836333033636462353032346430633538616532 +37656238643865343337646436653435393730613537666138376332383331356634643934636338 +30356130343731363262343937343665306537663864346164396234316233366539396663373938 +38313765346633616332393064643665626664363837393136366265653766313233656230643737 +39346130663232363662346662363637653037306337326462636662363066346639346539353261 +303562376362353266393533363163393838 diff --git a/env/test-arm/hosts b/env/test-arm/hosts new file mode 100755 index 0000000..cf43ee6 --- /dev/null +++ b/env/test-arm/hosts @@ -0,0 +1,24 @@ +[all:vars] +env = prod +internal_domain = infra.io +#internal_if = enp6s0 +#internal_mtu = 1400 +#firewall_grp = prod_NODES +#plan = "1024 MB RAM,25 GB SSD,1.00 TB BW" +#os = "Debian 11 x64 (bullseye)" +region = Frankfurt +consul_version = 1.14.1 +nomad_version = 1.6.0-beta.1 +cni_plugin_src = https://github.com/containernetworking/plugins/releases/download/v1.1.1/cni-plugins-linux-amd64-v1.1.1.tgz +label = "nomad-prod" +cluster_fqdn = "nomad-a.fejk.net" + +[masters] +n1 fqdn=n1a.fejk.net ansible_ssh_host=34.173.181.148 consul_node_role=bootstrap + +[nodes] +#n1 fqdn=n2.fejk.net ansible_ssh_host=45.76.86.97 + +[cluster:children] +masters +nodes diff --git a/env/test-arm/vultr.yaml b/env/test-arm/vultr.yaml new file mode 100755 index 0000000..6b43560 --- /dev/null +++ b/env/test-arm/vultr.yaml @@ -0,0 +1,2 @@ +--- +plugin: vultr diff --git a/env/test/group_vars/all/docker.yml b/env/test/group_vars/all/docker.yml new file mode 100755 index 0000000..62d4a2e --- /dev/null +++ b/env/test/group_vars/all/docker.yml @@ -0,0 +1,19 @@ +docker_daemon_options: + debug: false + experimental: true + + # !!! Don't stop running containers during updates !!! + # in some cases a default FIFO log size (64K) is not enought so increase + # the size there /proc/sys/fs/pipe-max-size + live-restore: true + + # default log driver will be loki +# log-driver: "loki" +# log-opts: +# loki-url: "https://localhost:3100/loki/api/v1/push" +# loki-batch-size: "100" +# max-file: "3" +# max-size: "10m" + + # Enable prometheus metrics endpoint + metrics-addr: "127.0.0.1:9323" diff --git a/env/test/group_vars/all/node_exporter.yml b/env/test/group_vars/all/node_exporter.yml new file mode 100755 index 0000000..68b27e2 --- /dev/null +++ b/env/test/group_vars/all/node_exporter.yml @@ -0,0 +1,20 @@ +--- +node_exporter_web_telemetry_path: /metrics +node_exporter_textfile_dir: /tmp/metrics + +node_exporter_disabled_collectors: +- infiniband +- bonding +- mdadm +- nfsd +- powersupplyclass +- rapl +- zfs +- xfs + +node_exporter_enabled_collectors: +- systemd +- processes +- textfile: + directory: "{{ node_exporter_textfile_dir }}" + diff --git a/env/test/group_vars/all/sshd.yml b/env/test/group_vars/all/sshd.yml new file mode 100755 index 0000000..d1ef083 --- /dev/null +++ b/env/test/group_vars/all/sshd.yml @@ -0,0 +1,6 @@ +--- +sshd_ports: +- 65022 +- 22 + +sshd_client_alive_interval: 3600 diff --git a/env/test/group_vars/all/vars.yml b/env/test/group_vars/all/vars.yml new file mode 100755 index 0000000..70c0bf7 --- /dev/null +++ b/env/test/group_vars/all/vars.yml @@ -0,0 +1,14 @@ +--- +admin_email: msirovy@gmail.com + +resolv: + search: fejk.net + nameservers: + - 1.1.1.1 + - 8.8.8.8 + +root_keys: +- keys/marek +- keys/github + + diff --git a/env/test/group_vars/all/vault.yml b/env/test/group_vars/all/vault.yml new file mode 100755 index 0000000..7f69481 --- /dev/null +++ b/env/test/group_vars/all/vault.yml @@ -0,0 +1,13 @@ +$ANSIBLE_VAULT;1.1;AES256 +64323965623131653765343164393132643635643766383864313330323537376534323532643166 +3166393561326265636533633362656430336139633735650a613839646362343133656261336632 +63306561623035666566323030633461333938313663363034646266326466663031386165613331 +3036616339626232330a663230636231623630336566343235323034373232666365643766353033 +66623066363766383463663337656130373234323564656361363632343961663739646533343231 +37333438626638366136386330316263386436396231633337393663656533333537306532613666 +66663466616264313364353239633334313633313235336633626238333561656361303139623337 +32613738353734303539346235653538363335363830343339656635346464393338326236616563 +36366639323166336435663966643564343365366636356633306633636235343434393763376439 +64333038373333336662636564313438613034636332323362396534656132643631336630396633 +37346434366666333535653538373361366534303662396137303566393764646433383931343063 +34633230373930363039 diff --git a/env/test/group_vars/all/vault_docker_config.yml b/env/test/group_vars/all/vault_docker_config.yml new file mode 100755 index 0000000..84334e0 --- /dev/null +++ b/env/test/group_vars/all/vault_docker_config.yml @@ -0,0 +1,14 @@ +$ANSIBLE_VAULT;1.1;AES256 +35333734616533393565663161653865626230303961303262323835626462366630376230383466 +3732366436663061633166376461366163636436653936370a336536633734383534346234353665 +35656565663466626465313534626461373264393133316431646461616435393865353063663337 +3536346437646430610a613531363937663334323134346138346161333762613932363634326265 +35363739313038656562636338363935323364343230376332313630386661356463386436663964 +30313532303739666238376164313138346532313261346637633963653732663539663036626534 +33353935626666633936346431663130383130326466323031623031633730653566636164346339 +39636438366637343433613261663964326265333338353431613232663561303461663266373261 +31313932313933663931363630323637636130396639303464386239666337613662646562663866 +31366430616531303530653138623535353466343666663431393962346636393362303364633439 +63643835333435363539646334373537393032393031383338653132623933393461663933303936 +63623262653261326436343333333062323934653937653362383330333161303937363836313332 +39313961343037313265333364366361323365343831393762333834636465343730 diff --git a/env/test/group_vars/all/vault_node_exporter.yml b/env/test/group_vars/all/vault_node_exporter.yml new file mode 100755 index 0000000..8fceab7 --- /dev/null +++ b/env/test/group_vars/all/vault_node_exporter.yml @@ -0,0 +1,13 @@ +$ANSIBLE_VAULT;1.1;AES256 +36323638326232623266376634666435353366306632653437396132653762313765316234333163 +3964366565303034356666353239666530333636303835360a333139656432373932393464343861 +32373533653634643463613930396132633736616465303138376264653839633832393435613532 +6334313732303763360a643365623562303533363332376238626239386334313734336234343461 +35313939356465376332336263346361316632356536663161323932636562303261376666373135 +39626539303238623231666233393234313831356465613131613832303133303161383237643138 +32366139373939336438633835343962373966303530616562663562383163313264386664376365 +64393837336531393965656635643262373536303234353239393138303265646534626666623237 +62623366303861353732653862373939616230653965653565306666393766356665353739643161 +61313865303162636436633733363938663730353732313134326336623165343233343230303261 +38303362366333346233666166656261336234653338353566373335666634313331383263373933 +36323462313935656638 diff --git a/env/test/hosts b/env/test/hosts new file mode 100755 index 0000000..104e3f1 --- /dev/null +++ b/env/test/hosts @@ -0,0 +1,6 @@ +[all:vars] +ansible_ssh_port=22 + +[cluster] +cow1 ansible_ssh_host=70.34.212.69 +cow2 ansible_ssh_host=70.34.219.216 \ No newline at end of file diff --git a/files/scripts/mysql-dump-all.sh b/files/scripts/mysql-dump-all.sh new file mode 100755 index 0000000..8c5900d --- /dev/null +++ b/files/scripts/mysql-dump-all.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Configure me +LOG_FILE=/var/log/mysql-backup.log +METRICS_PATH=/var/metrics/mysqldump.prom +BACKUP_DIR=/home/backups + + + +# +# Do NOT touch anything bellow this line +# +DATE=$(date +%F-%H%M) + + +echo "# HELP mysqldump_status Per database dump result 0.. OK, 1.. ERR" > /tmp/metrics.tmp + +echo "# HELP mysqldump_size_bytes Database dump size in bytes" >> /tmp/metrics.tmp +echo "# TYPE mysqldump_size_bytes gauge" >> /tmp/metrics.tmp +echo "# HELP mysqldump_duration_sec Database dump duration in seconds" >> /tmp/metrics.tmp +echo "# TYPE mysqldump_duration_sec gauge" >> /tmp/metrics.tmp + +for db in `mysql -sNe 'show databases;' | grep -vE '_schema|sys'`; do + dump_file=${BACKUP_DIR}/$db-${DATE}.sql.gz + start=`date +%s` + + echo "Backup $db into $dump_file" | tee -a ${LOG_FILE} + + mysqldump --add-drop-table $db | gzip > $dump_file + echo "mysqldump_status{db_name=\"$db\"} $?" >> /tmp/metrics.tmp + + dump_size_bytes=$(du -b $dump_file | cut -f1) + echo "mysqldump_size_bytes{db_name=\"$db\"} $dump_size_bytes" >> /tmp/metrics.tmp + + end=`date +%s` + runtime_sec=$((end-start)) + + echo "mysqldump_duration_sec{db_name=\"$db\"} $runtime_sec" >> /tmp/metrics.tmp +done + +dump_count=$(ls -l ${BACKUP_DIR} | grep ${DATE} | wc -l) + + +echo "# HELP mysqldump_count Count backuped databases" >> /tmp/metrics.tmp +echo "# TYPE mysqldump_count gauge" >> /tmp/metrics.tmp +echo "mysqldump_count $dump_count" >> /tmp/metrics.tmp + +mv /tmp/metrics.tmp ${METRICS_PATH} diff --git a/new_ansible.cfg b/new_ansible.cfg new file mode 100644 index 0000000..e386c67 --- /dev/null +++ b/new_ansible.cfg @@ -0,0 +1,1057 @@ +[defaults] +# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin) +# These warnings can be silenced by adjusting this setting to False. +;action_warnings=True + +# (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates. +;cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koala, meow, milk, moofasa, moose, ren, sheep, small, stegosaurus, stimpy, supermilker, three-eyes, turkey, turtle, tux, udder, vader-koala, vader, www + +# (string) Specify a custom cowsay path or swap in your cowsay implementation of choice +;cowpath= + +# (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them. +;cow_selection=default + +# (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True. +;force_color=False + +# (path) The default root path for Ansible config files on the controller. +;home=~/.ansible + +# (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information. +;nocolor=False + +# (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this. +;nocows=False + +# (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors. +;any_errors_fatal=False + +# (path) The password file to use for the become plugin. --become-password-file. +# If executable, it will be run and the resulting stdout will be used as the password. +;become_password_file= + +# (pathspec) Colon separated paths in which Ansible will search for Become Plugins. +;become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }} + +# (string) Chooses which cache plugin to use, the default 'memory' is ephemeral. +;fact_caching=memory + +# (string) Defines connection or path information for the cache plugin +;fact_caching_connection= + +# (string) Prefix to use for cache plugin files/tables +;fact_caching_prefix=ansible_facts + +# (integer) Expiration timeout for the cache plugin data +;fact_caching_timeout=86400 + +# (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activated by default. +;callbacks_enabled= + +# (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansible`). +;collections_on_ansible_version_mismatch=warning + +# (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if ``COLLECTIONS_PATHS`` includes ``'{{ ANSIBLE_HOME ~ "/collections" }}'``, and you want to add ``my.collection`` to that directory, it must be saved as ``'{{ ANSIBLE_HOME} ~ "/collections/ansible_collections/my/collection" }}'``. + +;collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }} + +# (boolean) A boolean to enable or disable scanning the sys.path for installed collections +;collections_scan_sys_path=True + +# (path) The password file to use for the connection plugin. --connection-password-file. +;connection_password_file= + +# (pathspec) Colon separated paths in which Ansible will search for Action Plugins. +;action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }} + +# (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) to return data that is not marked 'unsafe'. +# By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could represent a security risk. This option is provided to allow for backward compatibility, however users should first consider adding allow_unsafe=True to any lookups which may be expected to contain data which may be run through the templating engine late +;allow_unsafe_lookups=False + +# (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not need to change this setting. +;ask_pass=False + +# (boolean) This controls whether an Ansible playbook should prompt for a vault password. +;ask_vault_pass=False + +# (pathspec) Colon separated paths in which Ansible will search for Cache Plugins. +;cache_plugins={{ ANSIBLE_HOME ~ "/plugins/cache:/usr/share/ansible/plugins/cache" }} + +# (pathspec) Colon separated paths in which Ansible will search for Callback Plugins. +;callback_plugins={{ ANSIBLE_HOME ~ "/plugins/callback:/usr/share/ansible/plugins/callback" }} + +# (pathspec) Colon separated paths in which Ansible will search for Cliconf Plugins. +;cliconf_plugins={{ ANSIBLE_HOME ~ "/plugins/cliconf:/usr/share/ansible/plugins/cliconf" }} + +# (pathspec) Colon separated paths in which Ansible will search for Connection Plugins. +;connection_plugins={{ ANSIBLE_HOME ~ "/plugins/connection:/usr/share/ansible/plugins/connection" }} + +# (boolean) Toggles debug output in Ansible. This is *very* verbose and can hinder multiprocessing. Debug output can also include secret information despite no_log settings being enabled, which means debug mode should not be used in production. +;debug=False + +# (string) This indicates the command to use to spawn a shell under for Ansible's execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is. +;executable=/bin/sh + +# (string) This option allows you to globally configure a custom path for 'local_facts' for the implied :ref:`ansible_collections.ansible.builtin.setup_module` task when using fact gathering. +# If not set, it will fallback to the default from the ``ansible.builtin.setup`` module: ``/etc/ansible/facts.d``. +# This does **not** affect user defined tasks that use the ``ansible.builtin.setup`` module. +# The real action being created by the implicit task is currently ``ansible.legacy.gather_facts`` module, which then calls the configured fact modules, by default this will be ``ansible.builtin.setup`` for POSIX systems but other platforms might have different defaults. +;fact_path= + +# (pathspec) Colon separated paths in which Ansible will search for Jinja2 Filter Plugins. +;filter_plugins={{ ANSIBLE_HOME ~ "/plugins/filter:/usr/share/ansible/plugins/filter" }} + +# (boolean) This option controls if notified handlers run on a host even if a failure occurs on that host. +# When false, the handlers will not run if a failure has occurred on a host. +# This can also be set per play or on the command line. See Handlers and Failure for more details. +;force_handlers=False + +# (integer) Maximum number of forks Ansible will use to execute tasks on target hosts. +;forks=5 + +# (string) This setting controls the default policy of fact gathering (facts discovered about remote systems). +# This option can be useful for those wishing to save fact gathering time. Both 'smart' and 'explicit' will use the cache plugin. +;gathering=implicit + +# (list) Set the `gather_subset` option for the :ref:`ansible_collections.ansible.builtin.setup_module` task in the implicit fact gathering. See the module documentation for specifics. +# It does **not** apply to user defined ``ansible.builtin.setup`` tasks. +;gather_subset= + +# (integer) Set the timeout in seconds for the implicit fact gathering, see the module documentation for specifics. +# It does **not** apply to user defined :ref:`ansible_collections.ansible.builtin.setup_module` tasks. +;gather_timeout= + +# (string) This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible. +# This does not affect variables whose values are scalars (integers, strings) or arrays. +# **WARNING**, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don't change this setting unless you think you have an absolute need for it. +# We recommend avoiding reusing variable names and relying on the ``combine`` filter and ``vars`` and ``varnames`` lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays. +# For some uses you can also look into custom vars_plugins to merge on input, even substituting the default ``host_group_vars`` that is in charge of parsing the ``host_vars/`` and ``group_vars/`` directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder. +# All playbooks and roles in the official examples repos assume the default for this setting. +# Changing the setting to ``merge`` applies across variable sources, but many sources will internally still overwrite the variables. For example ``include_vars`` will dedupe variables internally before updating Ansible, with 'last defined' overwriting previous definitions in same file. +# The Ansible project recommends you **avoid ``merge`` for new projects.** +# It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should **avoid 'merge'**. +;hash_behaviour=replace + +# (pathlist) Comma separated list of Ansible inventory sources +;inventory=/etc/ansible/hosts + +# (pathspec) Colon separated paths in which Ansible will search for HttpApi Plugins. +;httpapi_plugins={{ ANSIBLE_HOME ~ "/plugins/httpapi:/usr/share/ansible/plugins/httpapi" }} + +# (float) This sets the interval (in seconds) of Ansible internal processes polling each other. Lower values improve performance with large playbooks at the expense of extra CPU load. Higher values are more suitable for Ansible usage in automation scenarios, when UI responsiveness is not required but CPU usage might be a concern. +# The default corresponds to the value hardcoded in Ansible <= 2.1 +;internal_poll_interval=0.001 + +# (pathspec) Colon separated paths in which Ansible will search for Inventory Plugins. +;inventory_plugins={{ ANSIBLE_HOME ~ "/plugins/inventory:/usr/share/ansible/plugins/inventory" }} + +# (string) This is a developer-specific feature that allows enabling additional Jinja2 extensions. +# See the Jinja2 documentation for details. If you do not know what these do, you probably don't need to change this setting :) +;jinja2_extensions=[] + +# (boolean) This option preserves variable types during template operations. +;jinja2_native=False + +# (boolean) Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote. +# If this option is enabled it will disable ``ANSIBLE_PIPELINING``. +;keep_remote_files=False + +# (boolean) Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for ``ansible-playbook``. +;bin_ansible_callbacks=False + +# (tmppath) Temporary directory for Ansible to use on the controller. +;local_tmp={{ ANSIBLE_HOME ~ "/tmp" }} + +# (list) List of logger names to filter out of the log file +;log_filter= + +# (path) File to which Ansible will log on the controller. When empty logging is disabled. +;log_path= + +# (pathspec) Colon separated paths in which Ansible will search for Lookup Plugins. +;lookup_plugins={{ ANSIBLE_HOME ~ "/plugins/lookup:/usr/share/ansible/plugins/lookup" }} + +# (string) Sets the macro for the 'ansible_managed' variable available for :ref:`ansible_collections.ansible.builtin.template_module` and :ref:`ansible_collections.ansible.windows.win_template_module`. This is only relevant for those two modules. +;ansible_managed=Ansible managed + +# (string) This sets the default arguments to pass to the ``ansible`` adhoc binary if no ``-a`` is specified. +;module_args= + +# (string) Compression scheme to use when transferring Python modules to the target. +;module_compression=ZIP_DEFLATED + +# (string) Module to use with the ``ansible`` AdHoc command, if none is specified via ``-m``. +;module_name=command + +# (pathspec) Colon separated paths in which Ansible will search for Modules. +;library={{ ANSIBLE_HOME ~ "/plugins/modules:/usr/share/ansible/plugins/modules" }} + +# (pathspec) Colon separated paths in which Ansible will search for Module utils files, which are shared by modules. +;module_utils={{ ANSIBLE_HOME ~ "/plugins/module_utils:/usr/share/ansible/plugins/module_utils" }} + +# (pathspec) Colon separated paths in which Ansible will search for Netconf Plugins. +;netconf_plugins={{ ANSIBLE_HOME ~ "/plugins/netconf:/usr/share/ansible/plugins/netconf" }} + +# (boolean) Toggle Ansible's display and logging of task details, mainly used to avoid security disclosures. +;no_log=False + +# (boolean) Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writing to the event log. +;no_target_syslog=False + +# (raw) What templating should return as a 'null' value. When not set it will let Jinja2 decide. +;null_representation= + +# (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed. +;poll_interval=15 + +# (path) Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying --private-key with every invocation. +;private_key_file= + +# (boolean) Makes role variables inaccessible from other roles. +# This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook. +;private_role_vars=False + +# (integer) Port to use in remote connections, when blank it will use the connection plugin default. +;remote_port= + +# (string) Sets the login user for the target machines +# When blank it uses the connection plugin's default, normally the user currently executing Ansible. +;remote_user= + +# (pathspec) Colon separated paths in which Ansible will search for Roles. +;roles_path={{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansible/roles" }} + +# (string) Set the main callback used to display Ansible output. You can only have one at a time. +# You can have many other callbacks, but just one can be in charge of stdout. +# See :ref:`callback_plugins` for a list of available options. +;stdout_callback=default + +# (string) Set the default strategy used for plays. +;strategy=linear + +# (pathspec) Colon separated paths in which Ansible will search for Strategy Plugins. +;strategy_plugins={{ ANSIBLE_HOME ~ "/plugins/strategy:/usr/share/ansible/plugins/strategy" }} + +# (boolean) Toggle the use of "su" for tasks. +;su=False + +# (string) Syslog facility to use when Ansible logs to the remote target +;syslog_facility=LOG_USER + +# (pathspec) Colon separated paths in which Ansible will search for Terminal Plugins. +;terminal_plugins={{ ANSIBLE_HOME ~ "/plugins/terminal:/usr/share/ansible/plugins/terminal" }} + +# (pathspec) Colon separated paths in which Ansible will search for Jinja2 Test Plugins. +;test_plugins={{ ANSIBLE_HOME ~ "/plugins/test:/usr/share/ansible/plugins/test" }} + +# (integer) This is the default timeout for connection plugins to use. +;timeout=10 + +# (string) Default connection plugin to use, the 'smart' option will toggle between 'ssh' and 'paramiko' depending on controller OS and ssh versions +;transport=smart + +# (boolean) When True, this causes ansible templating to fail steps that reference variable names that are likely typoed. +# Otherwise, any '{{ template_expression }}' that contains undefined variables will be rendered in a template or ansible action line exactly as written. +;error_on_undefined_vars=True + +# (pathspec) Colon separated paths in which Ansible will search for Vars Plugins. +;vars_plugins={{ ANSIBLE_HOME ~ "/plugins/vars:/usr/share/ansible/plugins/vars" }} + +# (string) The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The --encrypt-vault-id cli option overrides the configured value. +;vault_encrypt_identity= + +# (string) The label to use for the default vault id label in cases where a vault id label is not provided +;vault_identity=default + +# (list) A list of vault-ids to use by default. Equivalent to multiple --vault-id args. Vault-ids are tried in order. +;vault_identity_list= + +# (string) If true, decrypting vaults with a vault id will only try the password from the matching vault-id +;vault_id_match=False + +# (path) The vault password file to use. Equivalent to --vault-password-file or --vault-id +# If executable, it will be run and the resulting stdout will be used as the password. +;vault_password_file= + +# (integer) Sets the default verbosity, equivalent to the number of ``-v`` passed in the command line. +;verbosity=0 + +# (boolean) Toggle to control the showing of deprecation warnings +;deprecation_warnings=True + +# (boolean) Toggle to control showing warnings related to running devel +;devel_warning=True + +# (boolean) Normally ``ansible-playbook`` will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn't then ``ansible-playbook`` uses the task's action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then ``ansible-playbook`` will also include the task's arguments in the header. +# This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed. +# If you set this to True you should be sure that you have secured your environment's stdout (no one can shoulder surf your screen and you aren't saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the ``no_log: True`` parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information. +;display_args_to_stdout=False + +# (boolean) Toggle to control displaying skipped task/host entries in a task in the default callback +;display_skipped_hosts=True + +# (string) Root docsite URL used to generate docs URLs in warning/error text; must be an absolute URL with valid scheme and trailing slash. +;docsite_root_url=https://docs.ansible.com/ansible-core/ + +# (pathspec) Colon separated paths in which Ansible will search for Documentation Fragments Plugins. +;doc_fragment_plugins={{ ANSIBLE_HOME ~ "/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments" }} + +# (string) By default Ansible will issue a warning when a duplicate dict key is encountered in YAML. +# These warnings can be silenced by adjusting this setting to False. +;duplicate_dict_key=warn + +# (boolean) Whether or not to enable the task debugger, this previously was done as a strategy plugin. +# Now all strategy plugins can inherit this behavior. The debugger defaults to activating when +# a task is failed on unreachable. Use the debugger keyword for more flexibility. +;enable_task_debugger=False + +# (boolean) Toggle to allow missing handlers to become a warning instead of an error when notifying. +;error_on_missing_handler=True + +# (list) Which modules to run during a play's fact gathering stage, using the default of 'smart' will try to figure it out based on connection type. +# If adding your own modules but you still want to use the default Ansible facts, you will want to include 'setup' or corresponding network module to the list (if you add 'smart', Ansible will also figure it out). +# This does not affect explicit calls to the 'setup' module, but does always affect the 'gather_facts' action (implicit or explicit). +;facts_modules=smart + +# (boolean) Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host +;host_key_checking=True + +# (boolean) Facts are available inside the `ansible_facts` variable, this setting also pushes them as their own vars in the main namespace. +# Unlike inside the `ansible_facts` dictionary, these will have an `ansible_` prefix. +;inject_facts_as_vars=True + +# (string) Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are ``auto`` (the default), ``auto_silent``, ``auto_legacy``, and ``auto_legacy_silent``. All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting ``auto_silent`` or ``auto_legacy_silent``. The value of ``auto_legacy`` provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to ``/usr/bin/python``, will use that interpreter if present. +;interpreter_python=auto + +# (boolean) If 'false', invalid attributes for a task will result in warnings instead of errors +;invalid_task_attribute_failed=True + +# (boolean) Toggle to control showing warnings related to running a Jinja version older than required for jinja2_native +;jinja2_native_warning=True + +# (boolean) By default Ansible will issue a warning when there are no hosts in the inventory. +# These warnings can be silenced by adjusting this setting to False. +;localhost_warning=True + +# (int) Maximum size of files to be considered for diff display +;max_diff_size=104448 + +# (list) List of extensions to ignore when looking for modules to load +# This is for rejecting script and binary module fallback extensions +;module_ignore_exts={{(REJECT_EXTS + ('.yaml', '.yml', '.ini'))}} + +# (bool) Enables whether module responses are evaluated for containing non UTF-8 data +# Disabling this may result in unexpected behavior +# Only ansible-core should evaluate this configuration +;module_strict_utf8_response=True + +# (list) TODO: write it +;network_group_modules=eos, nxos, ios, iosxr, junos, enos, ce, vyos, sros, dellos9, dellos10, dellos6, asa, aruba, aireos, bigip, ironware, onyx, netconf, exos, voss, slxos + +# (boolean) Previously Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in previous plays would be unexpectedly 'sticky'. This setting allows to return to that behaviour. +;old_plugin_cache_clear=False + +# (path) A number of non-playbook CLIs have a ``--playbook-dir`` argument; this sets the default value for it. +;playbook_dir= + +# (string) This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/group_vars +;playbook_vars_root=top + +# (path) A path to configuration for filtering which plugins installed on the system are allowed to be used. +# See :ref:`plugin_filtering_config` for details of the filter file's format. +# The default is /etc/ansible/plugin_filters.yml +;plugin_filters_cfg= + +# (string) Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See https://bugs.python.org/issue11284). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits. +;python_module_rlimit_nofile=0 + +# (bool) This controls whether a failed Ansible playbook should create a .retry file. +;retry_files_enabled=False + +# (path) This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled. +# This file will be overwritten after each run with the list of failed hosts from all plays. +;retry_files_save_path= + +# (str) This setting can be used to optimize vars_plugin usage depending on user's inventory size and play selection. +;run_vars_plugins=demand + +# (bool) This adds the custom stats set via the set_stats plugin to the default output +;show_custom_stats=False + +# (string) Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as '1.00', "['a', 'b',]", and 'yes', 'y', etc. will be converted by the YAML parser unless fully quoted. +# Valid options are 'error', 'warn', and 'ignore'. +# Since 2.8, this option defaults to 'warn' but will change to 'error' in 2.12. +;string_conversion_action=warn + +# (boolean) Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts) +# These may include warnings about 3rd party packages or other conditions that should be resolved if possible. +;system_warnings=True + +# (boolean) This option defines whether the task debugger will be invoked on a failed task when ignore_errors=True is specified. +# True specifies that the debugger will honor ignore_errors, False will not honor ignore_errors. +;task_debugger_ignore_errors=True + +# (integer) Set the maximum time (in seconds) that a task can run for. +# If set to 0 (the default) there is no timeout. +;task_timeout=0 + +# (string) Make ansible transform invalid characters in group names supplied by inventory sources. +;force_valid_group_names=never + +# (boolean) Toggles the use of persistence for connections. +;use_persistent_connections=False + +# (bool) A toggle to disable validating a collection's 'metadata' entry for a module_defaults action group. Metadata containing unexpected fields or value types will produce a warning when this is True. +;validate_action_group_metadata=True + +# (list) Accept list for variable plugins that require it. +;vars_plugins_enabled=host_group_vars + +# (list) Allows to change the group variable precedence merge order. +;precedence=all_inventory, groups_inventory, all_plugins_inventory, all_plugins_play, groups_plugins_inventory, groups_plugins_play + +# (string) The salt to use for the vault encryption. If it is not provided, a random salt will be used. +;vault_encrypt_salt= + +# (bool) Force 'verbose' option to use stderr instead of stdout +;verbose_to_stderr=False + +# (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load. +# This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here. +;win_async_startup_timeout=5 + +# (list) Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these. +# This affects vars_files, include_vars, inventory and vars plugins among others. +;yaml_valid_extensions=.yml, .yaml, .json + +# (string) User defined prefix to use when creating the JSON files +;fact_caching_prefix= + +# (integer) Expiration timeout for the cache plugin data +;fact_caching_timeout=86400 + +# (path) Path in which the cache plugin will save the JSON files +;fact_caching_connection= + +# (bool) Toggle to control displaying markers when running in check mode. +# The markers are C(DRY RUN) at the beginning and ending of playbook execution (when calling C(ansible-playbook --check)) and C(CHECK MODE) as a suffix at every play and task that is run in check mode. +;check_mode_markers=False + +# (bool) Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) +;display_failed_stderr=False + +# (bool) Toggle to control displaying 'ok' task/host results in a task +;display_ok_hosts=True + +# (bool) Toggle to control displaying skipped task/host results in a task +;display_skipped_hosts=True + +# (bool) Configure the result format to be more readable +# When the result format is set to C(yaml) this option defaults to C(True), and defaults to C(False) when configured to C(json). +# Setting this option to C(True) will force C(json) and C(yaml) results to always be pretty printed regardless of verbosity. +# When set to C(True) and used with the C(yaml) result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option to C(False) or set the result format to C(json). +;callback_format_pretty= + +# (str) Define the task result format used in the callback output. +# These formats do not cause the callback to emit valid JSON or YAML formats. +# The output contains these formats interspersed with other non-machine parsable data. +;callback_result_format=json + +# (bool) This adds the custom stats set via the set_stats plugin to the play recap +;show_custom_stats=False + +# (bool) This adds output that shows when a task is started to execute for each host +;show_per_host_start=False + +# (bool) When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with C(-vv) or greater verbosity. +;show_task_path_on_failure=False + +# (bool) Configure the result format to be more readable +# When the result format is set to C(yaml) this option defaults to C(True), and defaults to C(False) when configured to C(json). +# Setting this option to C(True) will force C(json) and C(yaml) results to always be pretty printed regardless of verbosity. +# When set to C(True) and used with the C(yaml) result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option to C(False) or set the result format to C(json). +;callback_format_pretty= + +# (str) Define the task result format used in the callback output. +# These formats do not cause the callback to emit valid JSON or YAML formats. +# The output contains these formats interspersed with other non-machine parsable data. +;callback_result_format=json + +# (boolean) Toggles the use of persistence for connections +;use_persistent_connections=False + +# (int) Remote port to connect to. +;remote_port= + +# (string) Path to private key file to use for authentication. +;private_key_file= + +# (string) User name with which to login to the remote server, normally set by the remote_user keyword. +# If no user is supplied, Ansible will let the SSH client binary choose the user as it normally. +;remote_user= + +# (list) list of users to be expected to have admin privileges. This is used by the controller to determine how to share temporary files between the remote user and the become user. +;admin_users=root, toor + +# (string) Directory in which ansible will keep async job information +;async_dir=~/.ansible_async + +# (string) Checked when Ansible needs to execute a module as a different user. +# If setfacl and chown both fail and do not let the different user access the module's files, they will be chgrp'd to this group. +# In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group. +;common_remote_group= + +# (string) Temporary directory to use on targets when executing tasks. +;remote_tmp=~/.ansible/tmp + +# (list) List of valid system temporary directories on the managed machine for Ansible to validate C(remote_tmp) against, when specific permissions are needed. These must be world readable, writable, and executable. This list should only contain directories which the system administrator has pre-created with the proper ownership and permissions otherwise security issues can arise. +# When C(remote_tmp) is required to be a system temp dir and it does not match any in the list, the first one from the list will be used instead. +;system_tmpdirs=/var/tmp, /tmp + +# (boolean) This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task. +# It is useful when becoming an unprivileged user. +;allow_world_readable_tmpfiles=False + +# (list) Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these. +# This affects vars_files, include_vars, inventory and vars plugins among others. +;yaml_valid_extensions=.yml, .yaml, .json + + +[privilege_escalation] +# (boolean) Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method +;agnostic_become_prompt=True + +# (boolean) This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root. +# If executable, it will be run and the resulting stdout will be used as the password. +;become_allow_same_user=False + +# (boolean) Toggles the use of privilege escalation, allowing you to 'become' another user after login. +;become=False + +# (boolean) Toggle to prompt for privilege escalation password. +;become_ask_pass=False + +# (string) executable to use for privilege escalation, otherwise Ansible will depend on PATH +;become_exe= + +# (string) Flags to pass to the privilege escalation executable. +;become_flags= + +# (string) Privilege escalation method to use when `become` is enabled. +;become_method=sudo + +# (string) The user your login/remote user 'becomes' when using privilege escalation, most systems will use 'root' when no user is specified. +;become_user=root + + +[persistent_connection] +# (path) Specify where to look for the ansible-connection script. This location will be checked before searching $PATH. +# If null, ansible will start with the same directory as the ansible script. +;ansible_connection_path= + +# (int) This controls the amount of time to wait for response from remote device before timing out persistent connection. +;command_timeout=30 + +# (integer) This controls the retry timeout for persistent connection to connect to the local domain socket. +;connect_retry_timeout=15 + +# (integer) This controls how long the persistent connection will remain idle before it is destroyed. +;connect_timeout=30 + +# (path) Path to socket to be used by the connection persistence system. +;control_path_dir={{ ANSIBLE_HOME ~ "/pc" }} + + +[connection] +# (boolean) This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all. +# Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer. +# It can result in a very significant performance improvement when enabled. +# However this conflicts with privilege escalation (become). For example, when using 'sudo:' operations you must first disable 'requiretty' in /etc/sudoers on all managed hosts, which is why it is disabled by default. +# This setting will be disabled if ``ANSIBLE_KEEP_REMOTE_FILES`` is enabled. +;pipelining=False + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + + +[colors] +# (string) Defines the color to use on 'Changed' task status +;changed=yellow + +# (string) Defines the default color to use for ansible-console +;console_prompt=white + +# (string) Defines the color to use when emitting debug messages +;debug=dark gray + +# (string) Defines the color to use when emitting deprecation messages +;deprecate=purple + +# (string) Defines the color to use when showing added lines in diffs +;diff_add=green + +# (string) Defines the color to use when showing diffs +;diff_lines=cyan + +# (string) Defines the color to use when showing removed lines in diffs +;diff_remove=red + +# (string) Defines the color to use when emitting error messages +;error=red + +# (string) Defines the color to use for highlighting +;highlight=white + +# (string) Defines the color to use when showing 'OK' task status +;ok=green + +# (string) Defines the color to use when showing 'Skipped' task status +;skip=cyan + +# (string) Defines the color to use on 'Unreachable' status +;unreachable=bright red + +# (string) Defines the color to use when emitting verbose messages. i.e those that show with '-v's. +;verbose=blue + +# (string) Defines the color to use when emitting warning messages +;warn=bright purple + + +[selinux] +# (boolean) This setting causes libvirt to connect to lxc containers by passing --noseclabel to virsh. This is necessary when running on systems which do not have SELinux. +;libvirt_lxc_noseclabel=False + +# (list) Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible 'tolerate' those in the list w/o causing fatal errors. +# Data corruption may occur and writes are not always verified when a filesystem is in the list. +;special_context_filesystems=fuse, nfs, vboxsf, ramfs, 9p, vfat + + +[diff] +# (bool) Configuration toggle to tell modules to show differences when in 'changed' status, equivalent to ``--diff``. +;always=False + +# (integer) How many lines of context to show when displaying the differences between files. +;context=3 + + +[galaxy] +# (path) The directory that stores cached responses from a Galaxy server. +# This is only used by the ``ansible-galaxy collection install`` and ``download`` commands. +# Cache files inside this dir will be ignored if they are world writable. +;cache_dir={{ ANSIBLE_HOME ~ "/galaxy_cache" }} + +# (path) Collection skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy collection``, same as ``--collection-skeleton``. +;collection_skeleton= + +# (list) patterns of files to ignore inside a Galaxy collection skeleton directory +;collection_skeleton_ignore=^.git$, ^.*/.git_keep$ + +# (bool) Disable GPG signature verification during collection installation. +;disable_gpg_verify=False + +# (bool) Some steps in ``ansible-galaxy`` display a progress wheel which can cause issues on certain displays or when outputting the stdout to a file. +# This config option controls whether the display wheel is shown or not. +# The default is to show the display wheel if stdout has a tty. +;display_progress= + +# (path) Configure the keyring used for GPG signature verification during collection installation and verification. +;gpg_keyring= + +# (boolean) If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate. +;ignore_certs= + +# (list) A list of GPG status codes to ignore during GPG signature verification. See L(https://github.com/gpg/gnupg/blob/master/doc/DETAILS#general-status-codes) for status code descriptions. +# If fewer signatures successfully verify the collection than `GALAXY_REQUIRED_VALID_SIGNATURE_COUNT`, signature verification will fail even if all error codes are ignored. +;ignore_signature_status_codes= + +# (str) The number of signatures that must be successful during GPG signature verification while installing or verifying collections. +# This should be a positive integer or all to indicate all signatures must successfully validate the collection. +# Prepend + to the value to fail if no valid signatures are found for the collection. +;required_valid_signature_count=1 + +# (path) Role skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy``/``ansible-galaxy role``, same as ``--role-skeleton``. +;role_skeleton= + +# (list) patterns of files to ignore inside a Galaxy role or collection skeleton directory +;role_skeleton_ignore=^.git$, ^.*/.git_keep$ + +# (string) URL to prepend when roles don't specify the full URI, assume they are referencing this server as the source. +;server=https://galaxy.ansible.com + +# (list) A list of Galaxy servers to use when installing a collection. +# The value corresponds to the config ini header ``[galaxy_server.{{item}}]`` which defines the server details. +# See :ref:`galaxy_server_config` for more details on how to define a Galaxy server. +# The order of servers in this list is used to as the order in which a collection is resolved. +# Setting this config option will ignore the :ref:`galaxy_server` config option. +;server_list= + +# (path) Local path to galaxy access token file +;token_path={{ ANSIBLE_HOME ~ "/galaxy_token" }} + + +[inventory] +# (string) This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it +;host_pattern_mismatch=warning + +# (boolean) If 'true', it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning. + +;any_unparsed_is_failed=False + +# (bool) Toggle to turn on inventory caching. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory configuration. +# This message will be removed in 2.16. +;cache=False + +# (string) The plugin for caching inventory. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_plugin= + +# (string) The inventory cache connection. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_connection= + +# (string) The table prefix for the cache plugin. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_prefix=ansible_inventory_ + +# (string) Expiration timeout for the inventory cache plugin data. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_timeout=3600 + +# (list) List of enabled inventory plugins, it also determines the order in which they are used. +;enable_plugins=host_list, script, auto, yaml, ini, toml + +# (bool) Controls if ansible-inventory will accurately reflect Ansible's view into inventory or its optimized for exporting. +;export=False + +# (list) List of extensions to ignore when using a directory as an inventory source +;ignore_extensions={{(REJECT_EXTS + ('.orig', '.ini', '.cfg', '.retry'))}} + +# (list) List of patterns to ignore when using a directory as an inventory source +;ignore_patterns= + +# (bool) If 'true' it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning. + +;unparsed_is_failed=False + +# (boolean) By default Ansible will issue a warning when no inventory was loaded and notes that it will use an implicit localhost-only inventory. +# These warnings can be silenced by adjusting this setting to False. +;inventory_unparsed_warning=True + + +[netconf_connection] +# (string) This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings. +;ssh_config= + + +[paramiko_connection] +# (boolean) TODO: write it +;host_key_auto_add=False + +# (boolean) TODO: write it +;look_for_keys=True + +# (float) Configures, in seconds, the amount of time to wait for the SSH banner to be presented. This option is supported by paramiko version 1.15.0 or newer. +;banner_timeout=30 + +# (boolean) Automatically add host keys +;host_key_auto_add= + +# (boolean) Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host +;host_key_checking=True + +# (boolean) False to disable searching for private key files in ~/.ssh/ +;look_for_keys=True + +# (int) Remote port to connect to. +;remote_port=22 + +# (string) Path to private key file to use for authentication. +;private_key_file= + +# (string) Proxy information for running the connection via a jumphost +# Also this plugin will scan 'ssh_args', 'ssh_extra_args' and 'ssh_common_args' from the 'ssh' plugin settings for proxy information if set. +;proxy_command= + +# (boolean) SUDO usually requires a PTY, True to give a PTY and False to not give a PTY. +;pty=True + +# (boolean) Save the host keys to a file +;record_host_keys=True + +# (string) User to login/authenticate as +# Can be set from the CLI via the C(--user) or C(-u) options. +;remote_user= + +# (int) Number of seconds until the plugin gives up on failing to establish a TCP connection. +;timeout=10 + +# (boolean) Whether or not to enable RSA SHA2 algorithms for pubkeys and hostkeys +# On paramiko versions older than 2.9, this only affects hostkeys +# For behavior matching paramiko<2.9 set this to C(False) +;use_rsa_sha2_algorithms=True + + +[jinja2] +# (list) This list of filters avoids 'type conversion' when templating variables +# Useful when you want to avoid conversion into lists or dictionaries for JSON strings, for example. +;dont_type_filters=string, to_json, to_nice_json, to_yaml, to_nice_yaml, ppretty, json + + +[tags] +# (list) default list of tags to run in your plays, Skip Tags has precedence. +;run= + +# (list) default list of tags to skip in your plays, has precedence over Run Tags +;skip= + + +[runas_become_plugin] +# (string) Options to pass to runas, a space delimited list of k=v pairs +;flags= + +# (string) password +;password= + +# (string) User you 'become' to execute the task +;user= + + +[su_become_plugin] +# (string) Su executable +;executable=su + +# (string) Options to pass to su +;flags= + +# (string) Password to pass to su +;password= + +# (string) User you 'become' to execute the task +;user=root + +# (list) List of localized strings to match for prompt detection +# If empty we'll use the built in one +# Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a "Timeout" error. +;localized_prompts= + + +[sudo_become_plugin] +# (string) Sudo executable +;executable=sudo + +# (string) Options to pass to sudo +;flags=-H -S -n + +# (string) Password to pass to sudo +;password= + +# (string) User you 'become' to execute the task +;user=root + + +[callback_tree] +# (path) directory that will contain the per host JSON files. Also set by the C(--tree) option when using adhoc. +;directory=~/.ansible/tree + + +[ssh_connection] +# (string) Only used in parsing ProxyCommand for use in this plugin. +;ssh_args= + +# (string) Only used in parsing ProxyCommand for use in this plugin. +;ssh_common_args= + +# (string) Only used in parsing ProxyCommand for use in this plugin. +;ssh_extra_args= + +# (string) This is the location to save SSH's ControlPath sockets, it uses SSH's variable substitution. +# Since 2.3, if null (default), ansible will generate a unique hash. Use ``%(directory)s`` to indicate where to use the control dir path setting. +# Before 2.3 it defaulted to ``control_path=%(directory)s/ansible-ssh-%%h-%%p-%%r``. +# Be aware that this setting is ignored if C(-o ControlPath) is set in ssh args. +;control_path= + +# (string) This sets the directory to use for ssh control path if the control path setting is null. +# Also, provides the ``%(directory)s`` variable for the control path setting. +;control_path_dir=~/.ansible/cp + +# (boolean) Determines if SSH should check host keys. +;host_key_checking=True + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + +# (string) PKCS11 SmartCard provider such as opensc, example: /usr/local/lib/opensc-pkcs11.so +# Requires sshpass version 1.06+, sshpass must support the -P option. +;pkcs11_provider= + +# (integer) Number of attempts to connect. +# Ansible retries connections only if it gets an SSH error with a return code of 255. +# Any errors with return codes other than 255 indicate an issue with program execution. +;retries=0 + +# (string) This defines the location of the scp binary. It defaults to C(scp) which will use the first binary available in $PATH. +;scp_executable=scp + +# (string) Extra exclusive to the C(scp) CLI +;scp_extra_args= + +# (string) Preferred method to use when transferring files over SSH. +# When set to I(smart), Ansible will try them until one succeeds or they all fail. +# If set to I(True), it will force 'scp', if I(False) it will use 'sftp'. +# For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args="-O") +# This setting will overridden by ssh_transfer_method if set. +;scp_if_ssh=smart + +# (bool) TODO: write it +;sftp_batch_mode=yes + +# (string) This defines the location of the sftp binary. It defaults to C(sftp) which will use the first binary available in $PATH. +;sftp_executable=sftp + +# (string) Extra exclusive to the C(sftp) CLI +;sftp_extra_args= + +# (string) Arguments to pass to all SSH CLI tools. +;ssh_args=-C -o ControlMaster=auto -o ControlPersist=60s + +# (string) Common extra args for all SSH CLI tools. +;ssh_common_args= + +# (string) This defines the location of the SSH binary. It defaults to C(ssh) which will use the first SSH binary available in $PATH. +# This option is usually not required, it might be useful when access to system SSH is restricted, or when using SSH wrappers to connect to remote hosts. +;ssh_executable=ssh + +# (string) Extra exclusive to the SSH CLI. +;ssh_extra_args= + +# (string) Preferred method to use when transferring files over ssh +# Setting to 'smart' (default) will try them in order, until one succeeds or they all fail +# For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args="-O") +# Using 'piped' creates an ssh pipe with C(dd) on either side to copy the data +;transfer_method= + +# (string) Password prompt that sshpass should search for. Supported by sshpass 1.06 and up. +# Defaults to C(Enter PIN for) when pkcs11_provider is set. +;sshpass_prompt= + +# (integer) This is the default amount of time we will wait while establishing an SSH connection. +# It also controls how long we can wait to access reading the connection once established (select on the socket). +;timeout=10 + +# (bool) add -tt to ssh commands to force tty allocation. +;usetty=yes + + +[winrm] +# (list) A list of environment variables to pass through to C(kinit) when getting the Kerberos authentication ticket. +# By default no environment variables are passed through and C(kinit) is run with a blank slate. +# The environment variable C(KRB5CCNAME) cannot be specified here as it's used to store the temp Kerberos ticket used by WinRM. +;kinit_env_vars= + + +[inventory_plugins] +# (bool) Merge extra vars into the available variables for composition (highest precedence). +;use_extra_vars=False + + +[inventory_plugin_script] +# (boolean) Toggle display of stderr even when script was successful +;always_show_stderr=True + + +[inventory_plugin_yaml] +# (list) list of 'valid' extensions for files containing YAML +;yaml_valid_extensions=.yaml, .yml, .json + + +[url_lookup] +# (string) String of file system path to CA cert bundle to use +;ca_path= + +# (list) SSL/TLS Ciphers to use for the request +# When a list is provided, all ciphers are joined in order with C(:) +# See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) for more details. +# The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions +;ciphers= + +# (string) String of urllib2, all/yes, safe, none to determine how redirects are followed, see RedirectHandlerFactory for more information +;follow_redirects=urllib2 + +# (boolean) Whether or not to set "cache-control" header with value "no-cache" +;force=False + +# (boolean) Force basic authentication +;agent=False + +# (string) User-Agent to use in the request. The default was changed in 2.11 to C(ansible-httpget). +;agent=ansible-httpget + +# (float) How long to wait for the server to send data before giving up +;timeout=10 + +# (string) String of file system path to unix socket file to use when establishing connection to the provided url +;unix_socket= + +# (list) A list of headers to not attach on a redirected request +;unredirected_headers= + +# (boolean) Use GSSAPI handler of requests +# As of Ansible 2.11, GSSAPI credentials can be specified with I(username) and I(password). +;use_gssapi=False + +# (boolean) Determining whether to use credentials from ``~/.netrc`` file +# By default .netrc is used with Basic authentication headers +# When set to False, .netrc credentials are ignored +;use_netrc=True + + +[powershell] +# (string) Directory in which ansible will keep async job information. +# Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async"). +;async_dir=%USERPROFILE%\.ansible_async + +# (string) Temporary directory to use on targets when copying files to the host. +;remote_tmp=%TEMP% + +# (string) Directory in which ansible will keep async job information. +# Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async"). +;async_dir=%USERPROFILE%\.ansible_async + +# (string) Temporary directory to use on targets when copying files to the host. +;remote_tmp=%TEMP% + + +[vars_host_group_vars] +# (str) Control when this vars plugin may be executed. +# Setting this option to C(all) will run the vars plugin after importing inventory and whenever it is demanded by a task. +# Setting this option to C(task) will only run the vars plugin whenever it is demanded by a task. +# Setting this option to C(inventory) will only run the vars plugin after parsing inventory. +# If this option is omitted, the global I(RUN_VARS_PLUGINS) configuration is used to determine when to execute the vars plugin. +;stage= +